I searched/googled a lot but could not get the answer on how to capture HTTP response headers in UIWebview
. Say I redirect to user to registration gateway(which
NSHTTPURLResponse
has method like
- (NSDictionary *)allHeaderFields
For more info https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSHTTPURLResponse_Class/Reference/Reference.html#//apple_ref/occ/cl/NSHTTPURLResponse
EDIT: Sorry I did not think about UIWebView
. My solution works if you use NSURLConnection
But if you feed you webview with a NSURLConnection
then you have the chance to capture the connection including response headers.