Conforms to NSCopying
NSObject
NSSecureCoding
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

Instance Methods

requestBySerializingRequest:withParameters:error:

- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request withParameters:(id)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