阅读背景:

如何使用具有不同NSURLRequest的现有NSURLConnection?

来源:互联网 

I'm using an NSURLConnection instance to login into a web site that requires authentication, returning a cookie. Since the NSURLConnection stores the cookie, I would like to use the connection instance to logout. Logging out just requires a URL different than the login URL, sending the cookie I got when logging in. However, I can't see a way to assign a different NSURLRequest to an existing NSURLConnection -- at least with iOS 4.x. I can't require iOS 5 yet. I suppose I could record the cookie and create another NSURLConnection to logout. Any suggestions?I'm using an NSURLConnection instance to login




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: