0

I want to access html files which are protected by basic authentication. I am trying to load this html page using htmlloader and sending the request by urlRequest. I am using URLRequestDefaults class to set the credentials but when I see the request being send in the fiddler I don't see any authorization header being set by this. Am I doing something wrong here. My code is below.

URLRequestDefaults.authenticate = false;
URLRequestDefaults.setLoginCredentialsForHost("www.xyz.com", "madhur", "sharma");
var req:URLRequest = new URLRequest("http://bazinga.xyz.com/MyHtml/index.html");
htmlControl.htmlLoader.load(urlRequest);
4

1 に答える 1

1

APIをより注意深く読む必要があります。

「example.com」、「www.example.com」、および「sales.example.com」はそれぞれ固有のホストと見なされることに注意してください。

この場合、ドメインは一致しません。

于 2011-06-15T14:54:04.060 に答える