Answer the question
In order to leave comments, you need to log in
How to correctly send the body in a POST request?
Hello!
Please tell me how can I change this query:
GET https://api.telegram.org/key/getUpdates?limit%3D10... HTTP/1.1
HOST: api.telegram.org
Connection: Keep-Alive
POST https://api.telegram.org/key/getUpdates HTTP/1.1
HOST:api.telegram.org
Connection: Keep-Alive
Content-Length: 40
limit%3D100%26offset%3D0%26timeout%3D300
Answer the question
In order to leave comments, you need to log in
They also forgot to specify the header:
Content-Type: application/x-www-form-urlencoded
The server must know what format the request body is in (although it can try to guess, but why should it play a guessing game?)
So try not to encode, but just pass the string "limit=100&offset=0&timeout=300" in the post
Content-Length: 31
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question