An HTTP request consists of two parts. A set of headers and a body.
The headers include things like the URL being requested and caching control helpers (such as "I have a version of this from yesterday, only give me a new one if there are changes, OK?").
The body may or may not appear depending on the type of request. POST requests have bodies.
The body can be in any format the client likes. One of the headers will tell the server what the format is.
There are a couple of formats used by HTML forms, and PHP knows how to parse these and put the data into $_POST
.
If the data is in another format, such as JSON, or if the data doesn't conform to PHP's quirks (such as the rules for having []
on the end of keys with the same name) then you might want to access the data directly so you can parse it yourself.
That is the raw POST data.