add prefetch=False to streaming example
authorGareth Lloyd <glloyd@gmail.com>
Thu, 6 Sep 2012 14:13:46 +0000 (15:13 +0100)
committerGareth Lloyd <glloyd@gmail.com>
Thu, 6 Sep 2012 14:13:46 +0000 (15:13 +0100)
docs/user/advanced.rst

index d976503..f9f314a 100644 (file)
@@ -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