mirror of
https://github.com/kennethreitz/requests.git
synced 2026-06-05 22:50:18 +00:00
Added r.json documentation (document ALL the awesome features!)
This commit is contained in:
@@ -111,6 +111,19 @@ use the following code:
|
||||
>>> i = Image.open(StringIO(r.content))
|
||||
|
||||
|
||||
JSON Response Content
|
||||
---------------------
|
||||
|
||||
There's also a builtin JSON decoder, in case you're dealing with JSON data::
|
||||
|
||||
>>> import requests
|
||||
>>> r = requests.get('https://github.com/timeline.json')
|
||||
>>> r.json
|
||||
[{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...
|
||||
|
||||
In case the JSON decoding fails, ``r.json`` simply returns ``None``.
|
||||
|
||||
|
||||
Raw Response Content
|
||||
--------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user