Header Names #
This module defines the Name type, which represents validated HTTP header names that conform to
HTTP standards.
Reference: https://www.rfc-editor.org/rfc/rfc9110.html#section-5
Proposition asserting that a string is a valid HTTP header name: all characters are valid token characters and the string is non-empty.
Reference: https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names
Instances For
A validated HTTP header name that ensures all characters conform to HTTP standards. Header names are case-insensitive according to HTTP specifications.
Reference: https://www.rfc-editor.org/rfc/rfc9110.html#name-field-names
- value : String
The lowercased normalized header name string.
- isValidHeaderValue : IsValidHeaderName self.value
The proof that it's a valid header name.
- isLowerCase : Internal.IsLowerCase self.value
The proof that we stored the header name in stored as a lower case string.
Instances For
Instances For
Creates a Name from a string, panicking with an error message if the string contains invalid
characters for HTTP header names or is empty.
Instances For
Converts the header name to title case (e.g., "Content-Type").
Note: some well-known headers have unconventional casing (e.g., "WWW-Authenticate"), but since HTTP header names are case-insensitive, this always uses simple capitalization.
Instances For
Standard Transfer-Encoding header name