def stream(self, url, <EOL>headers=None, <EOL>stream_to=None,<EOL>retry=True, <EOL>default_headers=True,<EOL>show_progress=True):
bot.debug("<STR_LIT>" %url)<EOL>if headers == None:<EOL><INDENT>if self.headers is None:<EOL><INDENT>self._reset_headers()<EOL><DEDENT>headers = self.headers.copy()<EOL><DEDENT>response = requests.get(url,         <EOL>headers=headers,<EOL>verify=self._verify(),<EOL>stream=True)<EOL>if response.status_code == <NUM_LIT> and retry is True:<EOL><INDENT>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>self._update_token(response)<EOL>return self.stream(url,<EOL>headers, <EOL>stream_to, <EOL>retry=False,<EOL>show_progress=show_progress)<EOL><DEDENT><DEDENT>if response.status_code == <NUM_LIT:200>: <EOL><INDENT>return self._stream(response,<EOL>stream_to=stream_to,<EOL>show_progress=show_progress)<EOL><DEDENT>bot.error("<STR_LIT>" %(response.status_code))<EOL>sys.exit(<NUM_LIT:1>)<EOL>
stream is a get that will stream to file_name. This stream is intended
to take a url and (optionally) a set of headers and file to stream to,
and will generate a response with requests.get.

Parameters
==========
url: the url to do a requests.get to
headers: any updated headers to use for the requets
stream_to: the file to stream to
show_progress: boolean to show progress bar
retry: should the client retry? (intended for use after token refresh)
       by default we retry once after token refresh, then fail.