again::
>>> import requests
- >>> r = requests.get('https://github.com/timeline.json')
+ >>> r = requests.get('https://api.github.com/events')
>>> r.text
u'[{"repository":{"open_issues":0,"url":"https://github.com/...
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 = requests.get('https://api.github.com/events')
>>> r.json()
[{u'repository': {u'open_issues': 0, u'url': 'https://github.com/...
server, you can access ``r.raw``. If you want to do this, make sure you set
``stream=True`` in your initial request. Once you do, you can do this::
- >>> r = requests.get('https://github.com/timeline.json', stream=True)
+ >>> r = requests.get('https://api.github.com/events', stream=True)
>>> r.raw
<requests.packages.urllib3.response.HTTPResponse object at 0x101194810>
>>> r.raw.read(10)