Json Post raw data from FLEX
I want to post raw data using FLEX and JSON (and get the result in PHP). I succeed to store my JSON data into an object and post object as HTTPService.send expects. But it isn't a post raw data.
// my ActionScript code
var objSend:Object = new Object();
updatedObj.id = "myid"
updatedObj.action = "mydata";
objSend.jsonSendData = JSON.encode(data);
myHttpService.send(objSend);
// my HTTPService
<mx:HTTPService id="myHttpService" url="myurl"
useProxy="false" method="POST" resultFormat="text"
fault="faultHandler(event)">
</mx:HTTPService>
What I need to do is to post raw data without using an object neither a jsonSendData parameter. My need is to get raw 开发者_Go百科data in PHP just using file_get_contents("php://input"). Thanks a lot.
精彩评论