How are parameters sent in an HTTP POST request? - Stack Overflow
When executing a POST
request, the client is actually submitting a new document to the remote host. So, a query string does not (semantically) make sense. Which is why you don't have access to them in your application code.
POST
is a little bit more complex (and way more flexible):
When receiving a POST request, you should always expect a "payload", or, in HTTP terms: a message body. The message body in itself is pretty useless, as there is no standard (as far as I can tell. Maybe application/octet-stream?) format. The body format is defined by the Content-Type
header. When using a HTML FORM
element with method="POST"
, this is usually application/x-www-form-urlencoded
. Another very common type is multipart/form-data if you use file uploads. But is could be anything, ranging from text/plain
, over application/json
or even a custom application/octet-stream
.
Read full article from How are parameters sent in an HTTP POST request? - Stack Overflow
No comments:
Post a Comment