HTTPField
A name-value pair with additional metadata.
struct HTTPField
The field name is a case-insensitive but case-preserving ASCII string; the field value is a collection of bytes.
A name-value pair with additional metadata.
struct HTTPField
The field name is a case-insensitive but case-preserving ASCII string; the field value is a collection of bytes.
import HTTPTypes
A set of version-independent HTTP currency types.
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol CustomPlaygroundDisplayConvertible
A type that supplies a custom description for playground logging.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(from decoder: Decoder) throws
init(name: Name, lenientValue: some Collection<UInt8>)
Create an HTTP field from a name and a value. Leniently legalize the value.
init(name: Name, value: String)
Create an HTTP field from a name and a value.
init(name: Name, value: some Collection<UInt8>)
Create an HTTP field from a name and a value.
static func isValidValue(_ value: String) -> Bool
Whether the string is valid for an HTTP field value based on RFC 9110.
static func isValidValue(_ value: some Collection<UInt8>) -> Bool
Whether the byte collection is valid for an HTTP field value based on RFC 9110.
var description: String { get }
var indexingStrategy: DynamicTableIndexingStrategy
The strategy for whether the field is indexed in the HPACK or QPACK dynamic table.
var name: Name
The HTTP field name.
var playgroundDescription: Any { get }
var value: String { get set }
The HTTP field value as a UTF-8 string.
func encode(to encoder: Encoder) throws
func withUnsafeBytesOfValue<Result>(_ body: (UnsafeBufferPointer<UInt8>) throws -> Result) rethrows -> Result
Runs body
over the raw HTTP field value bytes as a contiguous buffer.
struct DynamicTableIndexingStrategy
The strategy for whether the field is indexed in the HPACK or QPACK dynamic table.
struct Name
A case-insensitive but case-preserving ASCII string with an allowed character set defined in RFC 9110.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.