willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge { if (self.authenticationChallenge ) { self.authenticationChallenge(connection, challenge); return; } if ([
我们称这些情况为服务端要求客户端接收认证挑战(AuthenticationChallenge)。
NSURLSession *)session didBecomeInvalidWithError:(NSError *)error; /* If implemented, when a connection level authenticationchallenge 设置认证请求完成时执行的block /** Sets a block to beexecuted when a session task has received a request specific authenticationchallenge
ResourceHandle*) { return false; } virtual void didReceiveAuthenticationChallenge(ResourceHandle*, const AuthenticationChallenge ProtectionSpace&) { return false; } #endif virtual void receivedCancellation(ResourceHandle*, const AuthenticationChallenge