That's right, check HTTP headers from server response:
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)responseWhy am I writing this blog? So that I wouldn't have to figure out same things over and over again! Now I've researched fourth time in two projects how to debug all HTTP headers in didReceiveResponse, so it was time to write it down.
{
NSHTTPURLResponse *httpResponse =
(NSHTTPURLResponse *)response;
NSLog(@"%@", [httpResponse allHeaderFields]);
}
Repeating things makes you faster, but next time I'll just google it - or check tag cloud from this blog :)
No comments:
Post a Comment