Skip to content
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

decode json response #167

Closed
ripples-alive opened this issue Aug 21, 2015 · 4 comments · Fixed by #559
Closed

decode json response #167

ripples-alive opened this issue Aug 21, 2015 · 4 comments · Fixed by #559
Milestone

Comments

@ripples-alive
Copy link

In the excellent Requests Python library, we can simply use the method .json to get the json decoded result. However, I can not do that with this library. Why not implement this?

@ccrims0n
Copy link
Contributor

@rmccue It can be done using the Content-Type header.
Can I work on it and generate a pull request?

@rmccue
Copy link
Collaborator

rmccue commented Apr 19, 2016

@73SL4 Absolutely! We should have a different method in Requests_Response for it, to match the Python one :)

@rmccue rmccue added this to the 1.7 milestone Apr 19, 2016
ccrims0n added a commit to ccrims0n/Requests that referenced this issue Jun 3, 2016
* Add json() which returns decoded json from the response body
  if the response bosy is a valid json else throws an exception
ccrims0n added a commit to ccrims0n/Requests that referenced this issue Jun 3, 2016
* Add json() which returns decoded json from the response body
  if the response bosy is a valid json else throws an exception
ccrims0n added a commit to ccrims0n/Requests that referenced this issue Jun 3, 2016
* Add json() which returns decoded json from the response body
  if the response bosy is a valid json else throws an exception
@ccrims0n
Copy link
Contributor

ccrims0n commented Jul 9, 2016

@rmccue Please verify the PR.

@rmccue rmccue modified the milestones: 1.7, 1.8 Jul 28, 2016
@angelxmoreno
Copy link

status ?

@jrfnl jrfnl modified the milestones: 1.8.x Next, 2.0.0 Apr 27, 2021
jrfnl pushed a commit that referenced this issue Sep 18, 2021
* Add json() which returns decoded json from the response body
  if the response body is a valid json else throws an exception
jrfnl pushed a commit that referenced this issue Oct 4, 2021
* Add json() which returns decoded json from the response body
  if the response body is a valid json else throws an exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants