Alamofire Docs (40% documented)

Alamofire Reference Request Extension Reference

Request

Responsible for sending a request and receiving the response and associated data from the server, as well as managing its underlying NSURLSessionTask.

  • Creates a response serializer that returns an object constructed from the response data using NSPropertyListSerialization with the specified reading options.

    Declaration

    Swift

    public class func propertyListResponseSerializer(options: NSPropertyListReadOptions = default) -> Serializer

    Parameters

    options

    The property list reading options. 0 by default.

    Return Value

    A property list object response serializer.

  • Adds a handler to be called once the request has finished.

    Declaration

    Swift

    public func responsePropertyList(completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self

    Parameters

    completionHandler

    A closure to be executed once the request has finished. The closure takes 4 arguments: the URL request, the URL response, if one was received, the property list, if one could be created from the URL response and data, and any error produced while creating the property list.

    Return Value

    The request.

  • Adds a handler to be called once the request has finished.

    Declaration

    Swift

    public func responsePropertyList(options: NSPropertyListReadOptions = default, completionHandler: (NSURLRequest, NSHTTPURLResponse?, AnyObject?, NSError?) -> Void) -> Self

    Parameters

    options

    The property list reading options. 0 by default.

    completionHandler

    A closure to be executed once the request has finished. The closure takes 4 arguments: the URL request, the URL response, if one was received, the property list, if one could be created from the URL response and data, and any error produced while creating the property list.

    Return Value

    The request.