AFCompoundResponseSerializer Class Reference
| Inherits from | AFHTTPResponseSerializer : NSObject |
| Declared in | AFURLResponseSerialization.h AFURLResponseSerialization.m |
Overview
AFCompoundSerializer is a subclass of AFHTTPResponseSerializer that delegates the response serialization to the first AFHTTPResponseSerializer object that returns an object for responseObjectForResponse:data:error:, falling back on the default behavior of AFHTTPResponseSerializer. This is useful for supporting multiple potential types and structures of server responses with a single serializer.
Class Methods
compoundSerializerWithResponseSerializers:
Creates and returns a compound serializer comprised of the specified response serializers.
+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializersDiscussion
Warning: Each response serializer specified must be a subclass of AFHTTPResponseSerializer, and response to -validateResponse:data:error:.
Declared In
AFURLResponseSerialization.h