Expand description
Utilities for parsing information from headers
Structs§
- Parse
Error - An error was encountered while parsing a header
Functions§
- append_
merge_ header_ maps - Given two
HeaderMaps, merge them together and return the mergedHeaderMap. If the twoHeaderMaps share any keys, values from the rightHeaderMapbe appended to the leftHeaderMap. - headers_
for_ prefix - Returns an iterator over pairs where the first element is the unprefixed header name that
starts with the input
keyprefix, and the second element is the full header name. - many_
dates - Read all the dates from the header map at
keyaccording theformat - 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
HeaderValueinto aVec<T>whereT: FromStr - read_
many_ primitive - Convert a
HeaderValueinto aVec<T>whereT: 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.