objective c - How access to response http headers from 'didReceiveAuthenticationChallenge' delegate method -
I need to deal with an HTTP authentication (401) using the NSURLConnection class, so I used "Connection: didReiveiveAuthenticationChallenge" Has implemented. Representative method
In this method, to answer the server challenge, I need the information contained in the HTTP server response header (WWW-Authentication Header). My problem is how can I use this header with this method?
(I noticed that the feedback headers are available from the NSURLResponse object (allHeaderFields method), but this object has been passed to the "Connection: didReiveiveResponse:" delegate method, too late to answer the server challenge Done.)
Regards Sebastien.
NSUrutitization challenge
has a -failureResponse
way. If that object is a NSHTTPURLResponse
(and it should be for an HTTP connection!), Then you can query it for -allHeaderFields
.
Comments
Post a Comment