NSUrlRequest: where an app can find the default headers for HTTP request?
问题 Does anybody know where an iOS app can see the default headers that NSUrlRequest sets for an HTTP request? Just creating NSUrlRequest with "http://.." NSURL and then asking: [request allHTTPHeaderFields] returns an empty dictionary. But I know that for example "Accept-Encoding" is set to "gzip" . So I want to get all that fields and show them in a HTTP request demo. I've also tried to swizzle [NSMutableURLRequest setValue:forHTTPHeaderField:] , but it seems that it is not used by underlying