FRURLSessionHandler
open class FRURLSessionHandler : NSObject, FRURLSessionHandlerProtocol
This class implements FRURLSessionHandlerProtocol protocol to handle HTTP redirect (default implementation) and perform no SSL Pinning
-
Handles HTTP redirection within NSURLSession
Declaration
Swift
public func urlSession(_ session: URLSession, task: URLSessionTask, willPerformHTTPRedirection response: HTTPURLResponse, newRequest request: URLRequest, completionHandler: @escaping (URLRequest?) -> Void)Parameters
sessionURLSession
taskCurrent URLSessionTask
responseResponse of current task which may explain reason for redirection
requestNewly constructed URLRequest object
completionHandlerCompletion callback
-
Declaration
Swift
open func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -
Declaration
Swift
open func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void)
View on GitHub