Request
Undocumented
-
Returns a JSON Decodable object contained in a result type constructed from the response data using
JSONDecoder
.Declaration
Swift
public static func serializeResponseJSONDecodable<T: Decodable>( decoder: JSONDecoder = JSONDecoder(), response: HTTPURLResponse?, data: Data?, error: Error?) -> Result<T>
Parameters
decoder
The JSONDecoder opject. Defaults to
JSONDecoder()
.response
The response from the server.
data
The data returned from the server.
error
The error already encountered if it exists.
Return Value
The result data type.