alamofire5

Alamofire 5 alternative to sessionDidReceiveChallenge

不打扰是莪最后的温柔 提交于 2020-06-16 17:26:27
问题 I have just shifted to Alamofire 5. Earlier I used URLSession and Certificate Pinner and to handle auth challenge I used delegate method of URLSessionDelegate with hash values func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { print("being challanged! for \(challenge.protectionSpace.host)") guard let trust = challenge.protectionSpace.serverTrust else { print(

Alamofire 5 alternative to sessionDidReceiveChallenge

心不动则不痛 提交于 2020-06-16 17:25:19
问题 I have just shifted to Alamofire 5. Earlier I used URLSession and Certificate Pinner and to handle auth challenge I used delegate method of URLSessionDelegate with hash values func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { print("being challanged! for \(challenge.protectionSpace.host)") guard let trust = challenge.protectionSpace.serverTrust else { print(