1 Reply Latest reply: Aug 24, 2010 2:15 PM by Asa - FMS RSS

    NetConnection using POST requests to retrieve data

    _Pez0 Community Member

      Hi Everyone,

       

      I've noticed that when I use NetConnection.call(methodName) in my client Actionscript it sends a POST request off to the server. I thought this was odd because requests for data are normally GET operations but I didn't worry about it because it doesn't impact my application.

       

      Now I have our sysadmin complaining about the amount of data I'm shifting over POST requests because POST requests aren't cached by the web servers (and we are working with the kind of traffic levels where that matters.) Is there anyway I can make call() use GET?

       

      The code  I'm using is all fairly standard, but here is the relevant snippit:

       

                          var nc:NetConnection = new NetConnection();
                     nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
                              nc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
                     nc.connect(serverUrl);
                     
                     var res:Responder=new Responder(onResult,onError);
      
                     function onResult(e:Object):void {
                          trace(Trace.structure(e,"",0));
                          loadSequence(e);
                     }
      
                     function onError(e:Object):void {
                          trace(Trace.structure(e,"",0));
                          noService();
                     }
      
                     nc.call(methodName,res);
      

       

      Any information even a 'No thats not possible' would be much appreciated.

       

      _Pez