HttpBasicAuthentication in IPhone
In my iPhone app, I am trying to display an image on iphone from my server, which needs authorization. I am trying to use NSURLConnection to get the image, but it is not asking me for the user credentials. i.e it is not at all going to didReceiveAuthenticationChallenge method. Can anyone help me with this issue? You can compute the necessary Authorization header yourself and manually apply it to the outgoing NSURLRequest before creating the NSURLConnection, as in: NSMutableURLRequest *someURLReq = ... NSString *auth = ... [someURLReq setValue:auth forHTTPHeaderField:@"Authorization"]; The