Skip to content

Commit

Permalink
Merge pull request #154 from tp6vup54/master
Browse files Browse the repository at this point in the history
Fix the bug that the return of request.get_data() is not string.
  • Loading branch information
eternnoir committed May 2, 2016
2 parents bd513cd + 5906d63 commit 700b869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/webhook_examples/webhook_flask_echo_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def index():
@app.route(WEBHOOK_URL_PATH, methods=['POST'])
def webhook():
if flask.request.headers.get('content-type') == 'application/json':
json_string = flask.request.get_data()
json_string = flask.request.get_data().decode('utf-8')
update = telebot.types.Update.de_json(json_string)
bot.process_new_messages([update.message])
return ''
Expand Down

0 comments on commit 700b869

Please sign in to comment.