Junior — Middle
How is the amount of request data specified in the HTTP protocol?
sobes.tech AI
Answer from AI
In the HTTP protocol, the amount of request data is specified using the Content-Length header. This header contains the exact number of bytes in the request body. For example:
Content-Length: 348
If the request body is transmitted using chunked transfer encoding, then Content-Length may be absent, and data is transmitted in parts with the size of each part specified.