mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-07 19:12:26 +01:00
fix urlopen data format
This commit is contained in:
parent
80b53f1ab7
commit
d1e4eeaf30
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ class Botan(object):
|
||||||
uid=str(uid),
|
uid=str(uid),
|
||||||
name=quote(event_name))
|
name=quote(event_name))
|
||||||
request = Request(url,
|
request = Request(url,
|
||||||
data=data,
|
data=data.encode(),
|
||||||
headers={'Content-Type': 'application/json'})
|
headers={'Content-Type': 'application/json'})
|
||||||
response = urlopen(request)
|
response = urlopen(request)
|
||||||
if response.getcode() != 200:
|
if response.getcode() != 200:
|
||||||
|
|
Loading…
Reference in a new issue