Request
class Request
Extension to Alamofire.Request providing ReactiveCocoa signals for each of the .response...() methods.
-
A
SignalProduceris returned over aRequestfor use withReactiveCococa. If the response is succesful, the serialized object is sent to the producer as a.Next(_)event followed by a.Completedevent. If the response fails, a.Failedevent is sent to the producer.Declaration
Swift
public func rac_response<T: ResponseSerializerType>(queue: dispatch_queue_t? = nil, responseSerializer:T) -> SignalProducer<T.SerializedObject, NSError>Parameters
queueThe queue on which the response completion handler is dispatched.
responseSerializerThe response serializer responsible for serializing the request, response, and data.
Return Value
A
SignalProducerthat schedules a handler with the givenresponseSerializeronstart(). -
Convenience ReactiveCocoa response using a
dataResponseSerializer().Declaration
Swift
public func rac_responseData(queue: dispatch_queue_t? = nil) -> SignalProducer<NSData, NSError> -
Convenience ReactiveCocoa response using a
stringResponseSerializer().Declaration
Swift
public func rac_responseString(queue: dispatch_queue_t? = nil) -> SignalProducer<String, NSError> -
Convenience ReactiveCocoa response using a
JSONResponseSerializer().Declaration
Swift
public func rac_responseJSON(queue: dispatch_queue_t? = nil) -> SignalProducer<AnyObject, NSError> -
Convenience ReactiveCocoa response using a
propertyListResponseSerializer().Declaration
Swift
public func rac_responsePropertyList(queue: dispatch_queue_t? = nil) -> SignalProducer<AnyObject, NSError>
View on GitHub
Request Extension Reference