From ad3cc4fca1af69c39a0bcf8ce28ce48c3aa1ea03 Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Wed, 10 Feb 2010 22:29:52 -0600 Subject: [PATCH] Allow passing headers into Stream. --- tweepy/streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): -- 2.25.1