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 ?

thndrkiss
  • 4,515
  • 8
  • 57
  • 96

1 Answers1

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?

Community
  • 1
  • 1
Jilouc
  • 12,684
  • 4
  • 46
  • 43