Sorry, but I still need help... could anyone please share the real example or project how to use multipart/form-data Content-Type and what additional modules or functions I need to create for sending file through POST request.
Thanks.
Search found 3 matches
- Fri May 24, 2019 3:55 am
- Forum: Programs, Libraries and Tools
- Topic: How to send file using urequests.
- Replies: 8
- Views: 10429
- Thu May 23, 2019 4:45 am
- Forum: Programs, Libraries and Tools
- Topic: How to send file using urequests.
- Replies: 8
- Views: 10429
- Sun May 19, 2019 6:32 am
- Forum: Programs, Libraries and Tools
- Topic: How to send file using urequests.
- Replies: 8
- Views: 10429
How to send file using urequests.
I need help. I'm trying to send a jpg file as Telegram bot. In Python we can use construction like this: import requests url = 'https://api.telegram.org/botXXXXXX/sendPhoto' f = {'photo': open("sd/photo.jpg", "rb")} data = {'chat_id' : 'XXXXXXX'} requests.post(url, data=data, files=f) How can we upl...