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 ?
Asked
Active
Viewed 520 times
1 Answers
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?