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

DataResponseSerializerProtocol

mattt edited this page Sep 18, 2020 · 2 revisions

DataResponseSerializerProtocol

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

public protocol DataResponseSerializerProtocol

Requirements

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