HTTPResponse

public struct HTTPResponse : Decodable

The response to an HTTP request over the HTTP service.

  • The human readable status of the response.

    Declaration

    Swift

    public let status: String
  • The status code of the response.

    Declaration

    Swift

    public let statusCode: Int
  • The content length of the response.

    Declaration

    Swift

    public let contentLength: Int64
  • The response headers.

    Declaration

    Swift

    public let headers: [String : [String]]?
  • The response cookies.

    Declaration

    Swift

    public let cookies: [String : HTTPCookie]?
  • The response body.

    Declaration

    Swift

    public let body: Data?
  • Declaration

    Swift

    public init(from decoder: Decoder) throws