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
HeaderMap
s, merge them together and return the mergedHeaderMap
. If the twoHeaderMap
s share any keys, values from the rightHeaderMap
be 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
key
prefix, and the second element is the full header name. - many_
dates - Read all the dates from the header map at
key
according 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
HeaderValue
into aVec<T>
whereT: FromStr
- read_
many_ primitive - Convert a
HeaderValue
into 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.