Hello I'm trying to send a simple GET request using flex mx:HTTPService:
<mx:HTTPService
id="service"
resultFormat="text"
result="loadJSONDataToTree(event);"
method="GET"
useProxy="false"
/>
Code that is supposed to send the request:
service.url = base_url + "workbench/pipeline/";
service.send();
Event handler:
private function loadJSONDataToTree(event: ResultEvent): void
{
// just making sure the method is called
var f_dp: ArrayCollection = new ArrayCollection();
f_dp.addItem("2");
TreeView.dataProvider = f_dp;
}
It appears that the send() method is called but the event is never triggered and the request is not sent, because I don't see any requests in my server log. What could be the reason of such behavior?
You should hook up the fault
event on your HTTPService
. If there is a failure of any kind, your fault
event handler should get called: