Explorar o código

Added an override closure for the NSURLSession:task:didCompleteWithError: method.

Noon, Christian %!s(int64=11) %!d(string=hai) anos
pai
achega
8b6af2fc13
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      Source/Alamofire.swift

+ 4 - 1
Source/Alamofire.swift

@@ -404,11 +404,14 @@ public class Manager {
         /// NSURLSessionTaskDelegate override closure for `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:` method.
         public var taskDidReceiveChallenge: ((NSURLSession!, NSURLSessionTask!, NSURLAuthenticationChallenge) -> (NSURLSessionAuthChallengeDisposition, NSURLCredential!))?
 
+        /// NSURLSessionTaskDelegate override closure for `URLSession:task:didCompleteWithError:` method.
+        public var taskNeedNewBodyStream: ((NSURLSession!, NSURLSessionTask!) -> (NSInputStream!))?
+
         /// NSURLSessionTaskDelegate override closure for `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:` method.
         public var taskDidSendBodyData: ((NSURLSession!, NSURLSessionTask!, Int64, Int64, Int64) -> Void)?
 
         /// NSURLSessionTaskDelegate override closure for `URLSession:task:didCompleteWithError:` method.
-        public var taskNeedNewBodyStream: ((NSURLSession!, NSURLSessionTask!) -> (NSInputStream!))?
+        public var taskDidComplete: ((NSURLSession!, NSURLSessionTask!, NSError!) -> Void)?
 
         func URLSession(session: NSURLSession!, task: NSURLSessionTask!, willPerformHTTPRedirection response: NSHTTPURLResponse!, newRequest request: NSURLRequest!, completionHandler: ((NSURLRequest!) -> Void)!) {
             var redirectRequest = request