Commit ad3cc4fc authored by Joshua Roesslein's avatar Joshua Roesslein
Browse files

Allow passing headers into Stream.

parent 45d5a4ac
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment