PseudoHeaderFields
The pseudo header fields of a request.
struct PseudoHeaderFields
The pseudo header fields of a request.
struct PseudoHeaderFields
import HTTPTypes
A set of version-independent HTTP currency types.
struct HTTPRequest
An HTTP request message consisting of pseudo header fields and header fields.
init(from decoder: Decoder) throws
init(method: Method, scheme: String?, authority: String?, path: String?, headerFields: HTTPFields = [:])
Create an HTTP request with values of pseudo header fields and header fields.
init(parsed fields: [HTTPField]) throws
Create an HTTP request with an array of parsed HTTPField
. The fields must include the necessary request pseudo header fields.
var authority: String? { get set }
A convenient way to access the value of the “:authority” pseudo header field.
var debugDescription: String { get }
var extendedConnectProtocol: String? { get set }
A convenient way to access the value of the “:protocol” pseudo header field.
var headerFields: HTTPFields
The request header fields.
var method: Method { get set }
The HTTP request method.
var path: String? { get set }
A convenient way to access the value of the “:path” pseudo header field.
var pseudoHeaderFields: PseudoHeaderFields
The pseudo header fields.
var scheme: String? { get set }
A convenient way to access the value of the “:scheme” pseudo header field.
func encode(to encoder: Encoder) throws
struct Method
The HTTP request method
protocol Copyable
A type whose values can be implicitly or explicitly copied.
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
var authority: HTTPField? { get set }
The underlying “:authority” pseudo header field.
var extendedConnectProtocol: HTTPField? { get set }
The underlying “:protocol” pseudo header field.
var method: HTTPField { get set }
The underlying “:method” pseudo header field.
var path: HTTPField? { get set }
The underlying “:path” pseudo header field.
var scheme: HTTPField? { get set }
The underlying “:scheme” pseudo header field.
func encode(to encoder: Encoder) throws
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.