RequestSerializer
The protocol that request serializers must adhere to.
-
The url that this request serializer is bound to.
Declaration
Swift
var url: NSURL? { get set } -
Any headers that will be appended on the request.
Declaration
Swift
var headers: [String: String]? { get set } -
The String encoding to be used.
Declaration
Swift
var stringEncoding: NSNumber { get } -
The cache policy.
Declaration
Swift
var cachePolicy: NSURLRequestCachePolicy { get } -
The timeout interval.
Declaration
Swift
var timeoutInterval: NSTimeInterval { get set } -
Build an request using the specified params passed in.
Declaration
Swift
func request(url: NSURL, method: HttpMethod, parameters: [String: AnyObject]?, headers: [String: String]?) -> NSURLRequestParameters
urlthe url of the resource.
methodthe method to be used.
parametersthe request parameters.
headersany headers to be used on this request.
Return Value
the URLRequest object.
-
Build an multipart request using the specified params passed in.
Declaration
Swift
func multipartRequest(url: NSURL, method: HttpMethod, parameters: [String: AnyObject]?, headers: [String: String]?) -> NSURLRequestParameters
urlthe url of the resource.
methodthe method to be used.
parametersthe request parameters.
headersany headers to be used on this request.
Return Value
the URLRequest object
View on GitHub
RequestSerializer Protocol Reference