Response
public struct Response<Success>
extension Response: CustomStringConvertible, CustomDebugStringConvertible
Type that represents the Response of a HTTP URL Load Request
-
The URL request sent to Server.
Declaration
Swift
public let urlRequest: URLRequest? -
The HTTP Response from Server.
Declaration
Swift
public let urlResponse: HTTPURLResponse? -
The response data from Server.
Declaration
Swift
public let responseData: Data? -
The result of response serialization.
Declaration
Swift
public let result: Result<Success, Error> -
Returns the associated value of the result if it is a success,
nilotherwise.Declaration
Swift
public var value: Success? { get } -
Returns the associated error value if the result if it is a failure,
nilotherwise.Declaration
Swift
public var error: Error? { get } -
initializer
Declaration
Swift
public init(urlRequest: URLRequest?, urlResponse: HTTPURLResponse?, responseData: Data?, result: Result<Success, Error>) -
A textual representation of this instance.
Declaration
Swift
public var description: String { get } -
A debug version textual representation of this instance.
Declaration
Swift
public var debugDescription: String { get }