Skip to content

Commit

Permalink
Added an override closure for the NSURLSession:task:didCompleteWithEr…
Browse files Browse the repository at this point in the history
…ror: method.
  • Loading branch information
cnoon committed Jan 28, 2015
1 parent 81c69be commit 8b6af2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/Alamofire.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b6af2f

Please sign in to comment.