我遇到了一个小问题。我正在连接到使用基本身份验证的web服务,现在我希望用户能够:注销,或每次请求进行一次新的身份验证。现在认证似乎被缓存了。我该怎么做呢?iPhone上的基本身份验证注销
我试图在最后追加#
,但这似乎没有办法。该URL的格式如下:
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];
我们可以看到您如何处理与Web服务的连接?你在使用NSUrlConnection吗? – self
是的我使用NSURLConnection – LuckyLuke
你看这个:http://www.springenwerk.com/2008/11/i-am-currently-building-iphone.html – self