2 Replies Latest reply on Nov 1, 2007 4:26 PM by ntsiii

    Insert variables from script into HTTPService url

    estacado1
      I'm trying to insert values from script into a HTTPService url. How do I go about doing this? I tried the code below, but it gives an error. Can anybody help?

      <mx:HTTPService
      id="httpCall"
      url=" http://api.service.com/user/{userName}/list?count={apiCount}&offset={(apiOffset)}&sort={ap iSort}&appkey=1234"
      resultFormat="e4x"
      result="callHandler(event);"
      fault="httpFaultHandler(event);"
      showBusyCursor="true"
      />

      <mx:Script>
      <![CDATA[

      import mx.controls.Alert;
      import mx.rpc.events.FaultEvent;
      import mx.rpc.events.ResultEvent;

      [Bindable]

      private var userName:String = "myName";
      private var apiCount:uint = 10;
      private var apiOffset:uint = 0;
      private var apiSort:String = "desc";