Reads the entirety of the request body, and passes it to the given output stream.
Throws an exception if the connection is closed before the expected data can be read (if a Content-Length header is given).
An output byte stream to write the body to.
Whether to allow the function to read potentially infinitely if no Content-Length header is provided.
The number of bytes that were read.
Reads the entirety of the request body, and passes it to the given output stream.
Throws an exception if the connection is closed before the expected data can be read (if a Content-Length header is given).