From: Gareth Lloyd Date: Thu, 6 Sep 2012 14:13:46 +0000 (+0100) Subject: add prefetch=False to streaming example X-Git-Tag: v0.14.1~7^2~10^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9a85560a2767e1b1420ab455b2eab508bed6666;p=services%2Fpython-requests.git add prefetch=False to streaming example --- diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index d976503..f9f314a 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -283,7 +283,7 @@ To use the Twitter Streaming API to track the keyword "requests":: import json r = requests.post('https://stream.twitter.com/1/statuses/filter.json', - data={'track': 'requests'}, auth=('username', 'password')) + data={'track': 'requests'}, auth=('username', 'password'), prefetch=False) for line in r.iter_lines(): if line: # filter out keep-alive new lines