Function read_request

Source
pub async fn read_request(reader: &mut ProgressReader) -> Result<Request>
Expand description

Read the request from the getter.

Will fail if there is an error while reading, or if no valid request is sent.

This will read exactly the number of bytes needed for the request, and leave the rest of the stream for the caller to read.

It is up to the caller do decide if there should be more data.