Instance Propertyswift-http-types 1.3.1HTTPTypes
headerFields
The response header fields.
var headerFields: HTTPFields
The response header fields.
var headerFields: HTTPFields
s9HTTPTypes12HTTPResponseV12headerFieldsAA10HTTPFieldsVvp
What are these?2KVZR
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.
struct HTTPFields
A collection of HTTP fields. It is used in HTTPRequest
and HTTPResponse
, and can also be used as HTTP trailer 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 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 PseudoHeaderFields
The pseudo header fields of a response.
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.