Function parse_request

Source
pub fn parse_request(
    req: &str,
) -> Result<Request<'_, impl Iterator<Item = &str>>, RequestError>
Expand description

splits the request string into headers (everything until the first empty line) and payload (everything after) Then assembles the Request struct while validating the existence of all required headers