I have a HTTP Basic server where i sometimes need a user to make a selection before logging in. I thought i'd do this by sending a HTTP response 401 with json contents in the HTTP body to provide the data the client needs to show to the user.
However, i cannot for the world understand how i get the response body content in the willSendRequestForAuthenticationChallenge
method. Since i use Basic Auth and provide the usr/pwd directly as a http "Authorization
" header, this method gets called whenever the user cannot login, or when he/she needs to make the selection i am talking about.
So... i have the NSURLAuthenticationChallenge
, but i cannot see any way of reading the body from that object.
If anybody could help out i'd really appreciate it!