PseudoHeaderFields
The pseudo header fields of a response.
struct PseudoHeaderFields
The pseudo header fields of a response.
struct PseudoHeaderFields
import HTTPTypes
A set of version-independent HTTP currency types.
struct HTTPResponse
An HTTP response message consisting of the “:status” pseudo header field and header fields.
init(from decoder: Decoder) throws
init(parsed fields: [HTTPField]) throws
Create an HTTP response with an array of parsed HTTPField
. The fields must include the necessary response pseudo header fields.
init(status: Status, headerFields: HTTPFields = [:])
Create an HTTP response with a status and header fields.
var debugDescription: String { get }
var headerFields: HTTPFields
The response header fields.
var pseudoHeaderFields: PseudoHeaderFields
The pseudo header fields.
var status: Status { get set }
The status of the response.
static func == (lhs: HTTPResponse, rhs: HTTPResponse) -> Bool
func encode(to encoder: Encoder) throws
func hash(into hasher: inout Hasher)
struct Status
The response status consisting of a 3-digit status code and a reason phrase. The reason phrase is ignored by modern HTTP versions.
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 status: HTTPField { get set }
The underlying “:status” 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.