Skip to content
Myr

update verbiage about streaming requests

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

The Twitter API is no longer used in the example.

authored by Randy Morris · committed by Randy Morris · parent d8180f5 · Browse files · 1 file+1 added−2 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+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:docs/user/advanced.rst+1 added-2 removed
273 unmodified lines
274------------------275276With ``requests.Response.iter_lines()`` you can easily iterate over streaming277APIs such as the `Twitter Streaming API <https://dev.twitter.com/docs/streaming-api>`_.278Simply set ``stream`` to ``False`` and iterate over the response with ``iter_lines()``::279279To use the Twitter Streaming API to track the keyword "requests"::280280 import json281 import requests282283 r = requests.get('http://httpbin.org/stream/20', stream=True)
313 unmodified lines