RequestResponse
public struct RequestResponse<Body>
extension RequestResponse: Equatable where Body: Equatable
extension RequestResponse: Hashable where Body: Hashable
A network response generated by a Requestable
-
Undocumented
Declaration
Swift
public static var empty: `Self` { get }
-
Create a
RequestResponse
Declaration
Swift
public init(url: URL?, headers: RequestHeaders?, statusCode: Int?, body: Body?)
Parameters
url
The URL that generated the response
headers
The response headers
statusCode
The response status code
body
The response body
-
The URL that generated the response
Declaration
Swift
public var url: URL?
-
The response headers
Declaration
Swift
public var headers: RequestHeaders?
-
The response status code
Declaration
Swift
public var statusCode: Int?
-
The response
Declaration
Swift
public var body: Body?
-
Declaration
Swift
public static func == (lhs: RequestResponse<Body>, rhs: RequestResponse<Body>) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)