[][src]Function http_bytes::parse_response_header_easy

pub fn parse_response_header_easy(
    buf: &[u8]
) -> Result<Option<(Response, &[u8])>, Error>

Parse this byte buffer into a Response plus remaining trailing bytes. Returns Ok(None) if not enough bytes yet to produce a complete response. Allocates a space for 50 headers (about 800 bytes) in stack each time.

let (r, _b) = http_bytes::parse_response_header_easy(b"HTTP/1.0 200 OK\r\n\r\n").unwrap().unwrap();
assert_eq!(r.status(), http_bytes::http::StatusCode::OK);