Skip to main content

parse_http_request

Function parse_http_request 

Source
pub fn parse_http_request(
    bytes: &[u8],
) -> Result<ParsedHttpRequest, &'static str>
Expand description

Parses a bounded HTTP request head without accepting folded or malformed headers.

§Parameters

§Returns

Returns the successful value produced by crate::http::parse_http_request or an error when the operation fails.

§Errors

Returns an error value when crate::http::parse_http_request cannot complete successfully.

§Performance

Performance is proportional to the size of the supplied inputs and any parsed or loaded data consumed by crate::http::parse_http_request.

§Examples

ⓘ
let _result = pharos_runtime_core::http::parse_http_request(b"");
  • crate::http for adjacent helpers that share the same runtime surface.