Function convert_header

Source
pub fn convert_header(value: &str) -> Result<Option<HttpHeader>, Error>
Expand description

Converts a string in “name: value” format into an HTTP header tuple. Returns None if the input string doesn’t contain a colon separator.

§Arguments

  • value - A string in the format “header_name: header_value”

§Returns

  • Result<Option<HttpHeader>> - The parsed header tuple or None if invalid format