Skip to content

Instantly share code, notes, and snippets.

@toranb
Created April 12, 2011 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toranb/914731 to your computer and use it in GitHub Desktop.
Save toranb/914731 to your computer and use it in GitHub Desktop.
- (NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(NSHTTPURLResponse *)response {
if (response != nil) {
NSArray* authToken = [NSHTTPCookie
cookiesWithResponseHeaderFields:[response allHeaderFields]
forURL:[NSURL URLWithString:@""]];
if ([authToken count] > 0) {
NSLog(@"cookies from the http POST %@", authToken);
}
}
return request;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment