Hi, I am trying to use AS3 to make a URL request with authorization header. Using the code below:
var request:URLRequ est = new URLRequest ( 'http://myserviceURL' );
var requestHeader:U RLRequestHeader = new URLRequestHeade r("Authorizatio n", "AuthSub token=CI3xlrq1D xCjtruCAw");
request.request Headers.push(re questHeader);
...
But I get the following error:
ArgumentError: Error #2096: The HTTP request header Authorization cannot be set via ActionScript.
at flash.net::URLS tream/load()
at flash.net::URLL oader/load()
...
But according to adobe's api reference, "Authorizat ion" header should be allowed.
Any ideas? Thanks!
var request:URLRequ est = new URLRequest ( 'http://myserviceURL' );
var requestHeader:U RLRequestHeader = new URLRequestHeade r("Authorizatio n", "AuthSub token=CI3xlrq1D xCjtruCAw");
request.request Headers.push(re questHeader);
...
But I get the following error:
ArgumentError: Error #2096: The HTTP request header Authorization cannot be set via ActionScript.
at flash.net::URLS tream/load()
at flash.net::URLL oader/load()
...
But according to adobe's api reference, "Authorizat ion" header should be allowed.
Any ideas? Thanks!
Comment