From: Joshua Roesslein Date: Thu, 11 Feb 2010 04:29:52 +0000 (-0600) Subject: Allow passing headers into Stream. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad3cc4fca1af69c39a0bcf8ce28ce48c3aa1ea03;p=tweepy.git Allow passing headers into Stream. --- diff --git a/tweepy/streaming.py b/tweepy/streaming.py index 8343f0e..0ea6436 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -69,7 +69,7 @@ class Stream(object): host = 'stream.twitter.com' def __init__(self, username, password, listener, timeout=5.0, retry_count = None, - retry_time = 10.0, snooze_time = 5.0, buffer_size=1500): + retry_time = 10.0, snooze_time = 5.0, buffer_size=1500, headers=None): self.auth = BasicAuthHandler(username, password) self.running = False self.timeout = timeout @@ -79,7 +79,7 @@ class Stream(object): self.buffer_size = buffer_size self.listener = listener self.api = API() - self.headers = {} + self.headers = headers or {} self.body = None def _run(self):