NSURLConnection. How do I grab just HTTP header information?
-
20-09-2019 - |
Question
NSURLRequest + NSHTTPURLResponse is clearly the way to role. How do I just grab the header info?
Solution
Calling allHeaderFields on your NSHTTPURLResponse will return them as a dictionary.
[response allHeaderFields]
where response is your NSHTTPURLResponse object.
OTHER TIPS
⌘-doubleclick on a reference to "NSHTTPURLResponse" in your code, and it will show you the documentation.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow