pub fn read_response(
r: impl Read + Send + 'static,
req_method: Option<&str>,
max_header_bytes: usize,
) -> Result<ParsedResponse, ParseError>Expand description
Parse an HTTP/1.1 response from r.
req_method is the method of the request that prompted this response —
needed to decide body presence for HEAD and CONNECT.
Port of Go’s ReadResponse(r *bufio.Reader, req *Request) (*Response, error).