Conforms to | NSCoding NSCopying NSObject |
Declared in | AFURLRequestSerialization.h |
Overview
The AFURLRequestSerialization
protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the Content-Type
HTTP header field value to application/json
.
Tasks
-
– requestBySerializingRequest:withParameters:error:
Returns a request with the specified parameters encoded into a copy of the original request.
required method
Instance Methods
requestBySerializingRequest:withParameters:error: 
- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request withParameters:(NSDictionary *)parameters error:(NSError *__autoreleasing *)error
Discussion
Returns a request with the specified parameters encoded into a copy of the original request.
Parameters
- request
The original request.
- parameters
The parameters to be encoded.
- error
The error that occurred while attempting to encode the request parameters.
Return Value
A serialized request.
Declared In
AFURLRequestSerialization.h