Skip to content

Side note on Requests

giloser edited this page Dec 4, 2020 · 1 revision

Side note on Requests

I had the user run this code ~/oprint/bin/python2 -c "import requests; requests.post('https://api.telegram.org/bot/sendMessage', {'disable_web_page_preview': True, 'text': 'Dies ist Test #2', 'chat_id': <CHAT_ID>});" and it took a looooong time. curl -XPOST -v -d "disable_web_page_preview=True" -d "chat_id=<CHAT_ID>" -d "text=Dies+is+ein+Test" "https://api.telegram.org/bot/sendMessage" on the other hand returned almost instantly.

He's using requests 2.21.0. 2.22.0 is out but we didn't test it yet. The changelog doesn't note this bug.

Clone this wiki locally