I have run into a little problem. I am connecting to a webservice that use Basic authentication and now I want the user to either: be able to log out, or that each time the request is made a new authentication is made. Right now the authentication seems to be cached. How do I do this?
I tried to append # at the end, but that did not seem to do the trick. The URL has the following format:
www.example.org/mywebservice/data
NSURL* url = [NSURL URLWithString: @"www.example.org/mywebservice/data"];
NSURLRequest* request = [[NSURLRequest alloc] initWithURL:url];
NSURLConnection* newConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
self.myConnection = newConnection;
[request release];
[newConnection release];
I got it to work. I changed
NSURLCredentialPersistenceSessiontoNSURLCredentialPersistenceNone.