I found that the server I am making REST calls to sends cookies to my iPhone. It also uses HTTP Basic Auth.
I have an application in which you can change the accounts used for authentication, however, I found that changing the credentials does not matter, since didReceiveAuthenticationChallenge never called.
I examined two possible fixes:
- manually deleting cookies when changing credentials.
[request setHTTPShouldHandleCookies:NO]
I wonder if I understand this correctly. I expected NSURLRequestReloadIgnoringCacheData take care of caching, but it doesn't seem to be that way.
How can i solve this?
EDIT: I just tried setting shouldHandleCookies to NO , but it seems cookies are still being sent to the server.
source share