我正在编写一个Xamarin原生iOS应用程序,并使用nsurlsession访问http端点,这给了我基本的类型身份验证挑战。我的问题是委托中的DidReceiveChallenge方法没有被调用:NSUrl url = new NSUrl("http://httpbin.org/basic-auth/test/test");
我正在尝试使用自签名证书连接到API进行测试。}];}-(void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challengecredential); // I.e. if it
我正在尝试发出由于自签名证书而失败的web请求:HttpResponseMessage Response = await Client.GetAsync按照这里的建议,我再次尝试使用httpclienthandler
handler.ServerCertificateCustomValidationCallbackreturn true; };//remove if this m