Mega Code Archive

 
Categories / Flex / Data Model
 

Two ways to call an HTTP service using the send() method with a parameter

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">   <mx:Script>          public function callService():void {       myService.cancel();       var params:Object = new Object();       params.param1 = 'val1';       myService.send(params);     }   </mx:Script>   <mx:HTTPService id="myService" destination="Dest" useProxy="true" />   <mx:Button click="myService.send({param1: 'val1'});" />   <mx:Button click="callService();" /> </mx:Application>