-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WEBSITE-836] Switch to data platform API #55
Merged
katylouise
merged 2 commits into
ukparliament:master
from
katylouise:katylouise/website-836_switch-api
Mar 23, 2017
Merged
[WEBSITE-836] Switch to data platform API #55
katylouise
merged 2 commits into
ukparliament:master
from
katylouise:katylouise/website-836_switch-api
Mar 23, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
katylouise
commented
Mar 23, 2017
- Added Accept header to request in get method to set them to application/n-triples.
4eccbc4
to
c3dfbf0
Compare
* Added Accept header to request in get method to set them to application/n-triples.
mattrayner
suggested changes
Mar 23, 2017
lib/parliament/request.rb
Outdated
@@ -108,7 +108,12 @@ def get(params: nil) | |||
endpoint_uri = URI.parse(api_endpoint) | |||
endpoint_uri.query = URI.encode_www_form(params.to_a) unless params.nil? | |||
|
|||
net_response = Net::HTTP.get_response(URI(endpoint_uri)) | |||
request = Net::HTTP::Get.new(URI(endpoint_uri)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to wrap this in an explicit URI call? as we are parsing the string into a uri above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No...removing it
mattrayner
approved these changes
Mar 23, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.