0 Replies Latest reply on Jun 12, 2007 8:10 AM by roland.schroth

    URLRequest - method POST and setting Headers does not work

      Hi everybody,
      I am having a big problem with setting the method and requestHeaders of an URLRequest object.
      It simply does not work and i have absolutely no idea, why.
      I hope you can help me :-)

      This is my code:

      var base64Encoder:Base64Encoder = new Base64Encoder();
      var credentials:String = base64Encoder.flush();

      var url:String = " http:// some.url.com";
      var request:URLRequest = new URLRequest(url);
      request.requestHeaders.push(new URLRequestHeader("Authorization","Basic " + credentials));
      request.method = URLRequestMethod.POST;

      var loader:URLLoader = new URLLoader();

      The Requests are always done via GET and the added Header also is not sent either.
      So what is the problem here?

      Kind regards, Roland