HTTPResponse

public class HTTPResponse<BodyType> : HTTPResponseType

Represents a higher-level HTTP Response.

  • The status code of the response

    Declaration

    Swift

    public let status: Int
  • The decoded body of the response.

    Declaration

    Swift

    public let body: BodyType
  • The headers of the response.

    Declaration

    Swift

    public let headers: [String : String]
  • Creates a new HTTPResponse.

    Declaration

    Swift

    public init(status: Int, body: BodyType, headers: [String : String])

    Parameters

    status

    The status code of the response.

    body

    The decoded body of the response.

    headers

    The headers of the response.