7 Replies Latest reply on Apr 29, 2008 6:51 AM by mtthwjean@gmail.com

    Not POSTing, it's GETing

    Woombah
      I have this piece of code in an Air script to log me into my website, I need to login as the Adobe air app I am writing is for managing my site, but the AJAX just won't work. No matter what I do it will only send GET requests, not POST. First I tried the usual AJAX HTTPRequest thing, then I tried it with Air's own built-in stuff but nothing will change:

      This is the javascript:
      quote:

      var data = 'User='+User+'&Password='+Password+'&Pincode='+Pincode;
      var secondsUTC = new Date().time;
      var dataText = new air.URLVariables(data);
      var request = new air.URLRequest(" http://www.example.comcom/?act=admin&action=login&login=true&air=true");
      request.data = dataText;
      request.method = air.URLRequestMethod.POST;
      var loader = new air.URLLoader();
      loader.dataFormat = air.URLLoaderDataFormat.variables;
      loader.addEventListener(air.Event.COMPLETE, completeHandler);
      try { loader.load(request); }
      catch (error) { air.trace("Unable to load URL"); }


      I've got my server spitting out the request details and it is a GET request, so the data I POSTed isn't there ... why is this?