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
session
URLSession
task
Current URLSessionTask
response
Response of current task which may explain reason for redirection
request
Newly constructed URLRequest object
completionHandler
Completion 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)