set timeout for post message with file object (#486)

This commit is contained in:
Anton Tagunov 2016-12-29 13:01:58 +03:00 committed by Noam Meltzer
parent 6a01164897
commit 48bcc3129a
2 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,7 @@ Contributors
The following wonderful people contributed directly or indirectly to this project:
- `Avanatiker <https://github.com/Avanatiker>`_
- `Anton Tagunov <https://github.com/anton-tagunov>`_
- `Balduro <https://github.com/Balduro>`_
- `bimmlerd <https://github.com/bimmlerd>`_
- `Eli Gao <https://github.com/eligao>`_

View file

@ -196,7 +196,11 @@ class Request(object):
if InputFile.is_inputfile(data):
data = InputFile(data)
result = self._request_wrapper('POST', url, body=data.to_form(), headers=data.headers)
result = self._request_wrapper('POST',
url,
body=data.to_form(),
headers=data.headers,
**urlopen_kwargs)
else:
data = json.dumps(data)
result = self._request_wrapper(