Response
public struct Response<T>
Captures server response with HTTP status code, headers and typed response
-
HTTP status code of response. Can be
nil
if request failed.Declaration
Swift
public var statusCode: Int?
-
HTTP response headers. Can be empty if request failed.
Declaration
Swift
public var headers: [String : Any]
-
Typed response, which can encapsulate a failure if the server returned an error or if the server’s data couldn’t be decoded as the appropriate type.
Declaration
Swift
public var result: Result<T, Error>