I am seeing something odd when using mx.rpc.Responder with HTTPService.
Typically I'll get an AsyncToken when sending a request, and add a
responder to it:
var theToken:AsyncToken = sessionService.send(some data...);
theToken.addResponder(new mx.rpc.Responder(onPutSessionResult,
onPutSessionFault));
And then define the functions like this:
private function onPutSessionResult(theEvent:ResultEvent):void
{
// do something with theEvent.result
console.log("onPutSessionResult called");
}
private function onPutSessionFault(theEvent:FaultEvent):void
{
// do something with theEvent.fault
console.log("onPutSessionFault called");
}
Here's what's odd. The browser (Chrome in my case) actually makes two
requests
OPTIONS and POST. I can see in the Chrome Dev Tools that the request
succeeded
and what the result data is.
But it looks to me like onPutSessionResult is called right after the
OPTIONS,
and so theEvent.result is null.
This is a recent 0.9.6, building with Moonshine.
Help?
-Fred