Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Danilo Bargen · committed by Danilo Bargen · parent aa42318 · Browse files · 1 file+13 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+13 added−0 removed

  • other:+13 added−0 removed

1 file+13 added−0 removed

modified:docs/user/quickstart.rst+13 added
109 unmodified lines
110 >>> from StringIO import StringIO111 >>> i = Image.open(StringIO(r.content))112113114JSON Response Content115---------------------116117There's also a builtin JSON decoder, in case you're dealing with JSON data::118119 >>> import requests120 >>> r = requests.get('https://github.com/timeline.json')121 >>> r.json122 [{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...123124In case the JSON decoding fails, ``r.json`` simply returns ``None``.125126127Raw Response Content128--------------------129130In the rare case that you'd like to get the absolute raw socket response from the server,
322 unmodified lines