pub async fn request<R>( stream: impl DerefMut<Target = R>, max_len: usize, default_host: Option<&[u8]>, scheme: &str, timeout: Duration, ) -> Result<(Request<()>, Bytes), Error>where R: AsyncRead + Unpin,
Try to parse a request from stream
stream
Will return error if building the http::Response internally failed, if path is empty, or any errors which occurs while reading from stream. See Error for all vairants.
http::Response
Error
Request will be cut off at max_len.
max_len