I\'m hoping someone can shed some light on the following, I think I am heading in the right direction with this. I want to login to my server with a user/pass combo, then I
This should work:
NSDictionary *headerFields = [(NSHTTPURLResponse*)response allHeaderFields];
NSURL *url = [NSURL URLWithString:@"http://www.mywebserver.com/login.php"];
NSArray *cookies = [NSHTTPCookie cookiesWithResponseHeaderFields:headerFields forURL:url];
Then you can know if the cookies
array contains the cookie you want.
You could also call this after receiving the response:
NSArray *cookies = [[NSHTTPCookieStorage sharedHTTPCookieStorage] cookiesForURL:url];