flex学习------HttpService配置使用

    技术2022-05-20  46

     

    //HttpServicel配置声明

    <mx:HTTPService url="servlet/WebContextPathServlet"      id="service"      result="serviceResult(event)"      method="GET" contentType="application/xml"      useProxy="false">  </mx:HTTPService>

     

     

       protected function application1_creationCompleteHandler(event:FlexEvent):void   {

    //发送请求    service.send();   }

     

    //回调得到返回的结果

       public function serviceResult(event:ResultEvent):void{    Alert.show(event.result as String);   }


    最新回复(0)