Skip to content

Commit 700b869

Browse files
committed
Merge pull request eternnoir#154 from tp6vup54/master
Fix the bug that the return of request.get_data() is not string.
2 parents bd513cd + 5906d63 commit 700b869

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/webhook_examples/webhook_flask_echo_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def index():
4848
@app.route(WEBHOOK_URL_PATH, methods=['POST'])
4949
def webhook():
5050
if flask.request.headers.get('content-type') == 'application/json':
51-
json_string = flask.request.get_data()
51+
json_string = flask.request.get_data().decode('utf-8')
5252
update = telebot.types.Update.de_json(json_string)
5353
bot.process_new_messages([update.message])
5454
return ''

0 commit comments

Comments
 (0)