0

I used synchronize method of nsurlconnection for initiating the network connection. Since my system is behind a proxy i want to add the code for challenge response. The problem which i am facing is that the challenge response method is not getting called. is using synchronize method is the problem ?

1 Answer 1

0

Do you mean sendSynchronousRequest:returningResponse:error: by "synchronize`?

If so, connection:didReceiveAuthenticationChallenge: is not called for synchronous requests. But you can still provide NSURLCredential / NSURLProtectionSpace and store it into NSURLCredentialStorage before sending the request.

Check Mike's answer here: Can I use NSURLCredentialStorage for HTTP Basic Authentication?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.