Defines protocol for objects which converts NSData of response body into responseObject
More...

Instance Methods | |
| (id) | - objectFromResponseData:error: |
Converts NSData of response body into responseObject which would be used in parsing, validation or just as result. More... | |
| (BOOL) | - isCorrectContentType: |
Check that NSData content-type correct before processing here. More... | |
Defines protocol for objects which converts NSData of response body into responseObject
Main method is objectFromResponseData:error:, which does all work, plus another optional method isCorrectContentType: used to validate content-type
| - (id TRCResponseSerializer) objectFromResponseData: | (NSData *) | data | |
| error: | (NSError **) | error | |
Converts NSData of response body into responseObject which would be used in parsing, validation or just as result.
| data | input NSData |
| error | write NSError into that pointer if error happens |
responseObject which would be used as result
|
optional |
Check that NSData content-type correct before processing here.
If this method not implemented or returns nil, then validation avoided.
| responseContentType | input content-type string |