HTTPResponseHead
public struct HTTPResponseHead : Equatable
extension HTTPResponseHead: CustomStringConvertible
A representation of the status line and header fields of a HTTP response.
-
Undocumented
Declaration
Swift
public var headers: HTTPHeaders
-
The HTTP response status.
Declaration
Swift
public var status: HTTPResponseStatus { get set }
-
The HTTP version that corresponds to this response.
Declaration
Swift
public var version: HTTPVersion { get set }
-
Create a
HTTPResponseHead
Declaration
Swift
public init(version: HTTPVersion, status: HTTPResponseStatus, headers: HTTPHeaders = HTTPHeaders())
Parameters
version
The version for this HTTP response.
status
The status for this HTTP response.
headers
The headers for this HTTP response.
-
Declaration
Swift
public static func == (lhs: HTTPResponseHead, rhs: HTTPResponseHead) -> Bool
-
Whether this HTTP response is a keep-alive request: that is, whether the connection should remain open after the request is complete.
Declaration
Swift
public var isKeepAlive: Bool { get }
-
Declaration
Swift
public var description: String { get }