mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
set timeout for post message with file object (#486)
This commit is contained in:
parent
6a01164897
commit
48bcc3129a
2 changed files with 6 additions and 1 deletions
|
@ -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>`_
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue