Expand description
Helpers for HTTP headers.
Structs§
- Content
Disposition  - The value of a 
Content-DispositionHTTP header. - Token
String  - A non-empty string consisting only of 
tokens as defined in [RFC 9110 Section 3.2.6]. 
Enums§
- Content
Disposition Parse Error  - An error encountered when trying to parse an invalid 
ContentDisposition. - Content
Disposition Type  - A disposition type in the 
Content-DispositionHTTP header as defined in Section 4.2 of RFC 6266. - Token
String Parse Error  - The parsed string contains a character not allowed for a 
TokenString. 
Constants§
- APPLICATION_
JSON  - The 
application/jsonmedia type as aHeaderValue. - APPLICATION_
OCTET_ STREAM  - The 
application/octet-streammedia type as aHeaderValue. 
Functions§
- is_
ascii_ string_ quotable  - Whether the given char is in the US-ASCII character set and allowed inside a quoted string.
 - is_
tchar  - Whether the given byte is a 
tokenchar. - is_
token  - Whether the given bytes slice is a 
token. - is_
token_ string  - Whether the given string is a 
token. - is_
vchar  - Whether the given char is a visible US-ASCII char.
 - quote_
ascii_ string_ if_ required  - If the US-ASCII field value does not contain only token chars, convert it to a quoted string.
 - sanitize_
for_ ascii_ quoted_ string  - Remove characters that do not pass 
is_ascii_string_quotable()from the given string. - unescape_
string  - Removes the escape backslashes in the given string.