I have an air app and I want to add proxy-authorization header whenever my client is behind a proxy. I am adding 'proxy-Authoriztion' header in urlRequest headers but still I am getting the OS prompt for username/password.
var loader:HTMLLoader = new HTMLLoader();
var be:Base64Encoder = new Base64Encoder();
be.insertNewLines = false;
be.encode("test" + ":" + "test");
var urlRequest:URLRequest = new URLRequest("http://google.co.in");
urlRequest.authenticate = false;
urlRequest.requestHeaders.push(new URLRequestHeader("Proxy-Authorization","Basic "+ be.toString()));
page.htmlLoader.load(urlRequest);
I checked fiddler and what I see is that 1st Response is 301 and proxy-authorization header is added 2nd Response is 407 and proxy-authorization header is not added.
After this I get the OS prompt. Anybody has any ideas on this?