Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

DataResponseSerializerProtocol

mattt edited this page Jan 26, 2020 · 2 revisions

DataResponseSerializerProtocol

The type to which all data response serializers must conform in order to serialize a response.

public protocol DataResponseSerializerProtocol

Required Methods

serialize(request:response:data:error:)

Serialize the response Data into the provided type..

func serialize(request: URLRequest?, response: HTTPURLResponse?, data: Data?, error: Error?) throws  -> SerializedObject

Parameters

  • request: URLRequest which was used to perform the request, if any.
  • response: HTTPURLResponse received from the server, if any.
  • data: Data returned from the server, if any.
  • error: Error produced by Alamofire or the underlying URLSession during the request.

Throws

Any Error produced during serialization.

Returns

The SerializedObject.

Types
Protocols
Global Typealiases

Clone this wiki locally