Module header

Source
Expand description

Utilities for parsing information from headers

Structs§

ParseError
An error was encountered while parsing a header

Functions§

append_merge_header_maps
Given two HeaderMaps, merge them together and return the merged HeaderMap. If the two HeaderMaps share any keys, values from the right HeaderMap be appended to the left HeaderMap.
headers_for_prefix
Returns an iterator over pairs where the first element is the unprefixed header name that starts with the input key prefix, and the second element is the full header name.
many_dates
Read all the dates from the header map at key according the format
one_or_none
Read exactly one or none from a headers iterator
quote_header_value
Conditionally quotes and escapes a header value if the header value contains a comma or quote.
read_many_from_str
Convert a HeaderValue into a Vec<T> where T: FromStr
read_many_primitive
Convert a HeaderValue into a Vec<T> where T: Parse
set_request_header_if_absent
Given an HTTP request, set a request header if that header was not already set.
set_response_header_if_absent
Given an HTTP response, set a response header if that header was not already set.