Skip to main content

parse_request

Function parse_request 

Source
pub fn parse_request(buf: &[u8]) -> Result<Request<String>, Error>
Expand description

Parses the given byte slice into an HTTP/1.1 request with a String body, or returns an error.

This function only supports HTTP requests, and does not support HTTP/0.9, HTTP/1.0, HTTP/2, or HTTP/3 requests. buf must contain the full request, including body, before parsing.