HTTPResponse

public struct HTTPResponse : HTTPResponseCompatible, ExpressibleByDictionaryLiteral

A URL load response.

  • Specifies the version of the HTTP.

    Declaration

    Swift

    public var version: String
  • Specifies the status code.

    Declaration

    Swift

    public var statusCode: String
  • Specifies the header fields.

    Declaration

    Swift

    public var headerFields: [String : String]
  • Specifies the body.

    Declaration

    Swift

    public var body: Data?
  • Creates a new http response with header fields.

    Declaration

    Swift

    public init(dictionaryLiteral elements: (String, String)...)