DynamicTableIndexingStrategy
The strategy for whether the field is indexed in the HPACK or QPACK dynamic table.
struct DynamicTableIndexingStrategy
The strategy for whether the field is indexed in the HPACK or QPACK dynamic table.
struct DynamicTableIndexingStrategy
import HTTPTypes
A set of version-independent HTTP currency types.
struct HTTPField
A name-value pair with additional metadata.
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 Name
A case-insensitive but case-preserving ASCII string with an allowed character set defined in RFC 9110.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
static var automatic: `Self` { get }
Default strategy.
static var avoid: `Self` { get }
Don’t put this field in the dynamic table.
static var disallow: `Self` { get }
Don’t put this field in the dynamic table, and set a flag to disallow intermediaries to index this field.
static var prefer: `Self` { get }
Always put this field in the dynamic table if possible.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.