optional func urlSession_ session URLSession didReceive challenge URLAuthenticationChallenge completionHandler escaping Sendable URLSessionAuthChallengeDisposition URLCredential - Void上面这个URLSessionDe
这个URLSessionDelegate方法在URLSession接收到需要身份验证的服务器回应时会被调用。具体来说,当URLSession接收到一个需要身份验证的URL请求时,会调用该方法来通知委托对象进行身份验证。委托对象可以通过调用completionHandler来提供适当的认证方式,如提供凭据或取消请求。
原文地址: https://www.cveoy.top/t/topic/hMxx 著作权归作者所有。请勿转载和采集!