Added r.json documentation (document ALL the awesome features!)

This commit is contained in:
Danilo Bargen
2012-06-06 16:59:20 +02:00
parent aa42318395
commit 1164450dac
+13
View File
@@ -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
--------------------