Maybe it would be interesting to get also this info from NSURLSession because we don't have always access to the server ?
I think it would be. Originally I thought that might be possible because NSHTTPURLResponse knows the HTTP version of the response (note that it's one of the parameters to
-initWithURL:statusCode:HTTPVersion:headerFields:
). But annoyingly there's no
HTTPVersion
property so, while the object has the value, there's no way to get it out. I had a chat with CFNetwork Engineering about this and they confirmed my analysis.
So, if you think this would be useful to you, please file an enhancement request for this API. I'd appreciate you posting your bug number here, just for the record.
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"