22 NOVEMBER 2009
// HTTPService GET Request
private function getShiftList():void{
svcShiftsIndex.url = "/schedules/"+scheduleId+"/shifts.xml";
svcShiftsIndex.send();
}
<mx:HTTPService id="svcShiftsIndex"
resultFormat="e4x"
method="GET"
fault="handleShiftsIndexFaultResult(event)"
result="handleShiftsIndexResult(event)"
/>
Make sure to pass the authenticity_token in the url to keep a valid xml structure.
<mx:HTTPService id="svcShiftsCreate"
contentType="application/xml"
resultFormat="e4x"
method="POST"
fault="handleShiftsCreateFaultResult(event)"
result="handleShiftsCreateResult(event)"
/>
Make sure to pass the authenticity_token in the url to keep a valid xml structure.
// HTTPService POST Request
private function handleShiftCreated(event:ShiftControllerEvent):void {
svcShiftsCreate.url = "/schedules/" + scheduleId +
"/shifts.xml?authenticity_token="+authenticityToken;
var xmlParams:XML = XML(
'<shift>'+
'<category_id>1</category_id>'+
'</shift>'
);
svcShiftsCreate.send(xmlParams);
ShiftSequencer.reDrawShifts();
}
<mx:HTTPService id="svcShiftsUpdate"
contentType="application/xml"
resultFormat="e4x"
result="handleShiftsUpdateResult(event)"
fault="handleShiftsUpdateFaultResult(event)"
/>
Ressources:
Magento powered fabric store for organic cotton
Mass Customization Fashion Label from Germany
Blog- and Community site for the first Game-TV-Show on MTV Germany.
MTV Home is one of MTV Microsite's wich runs on the new developed Rails-Microsite-Engine at MTV Germany.
Game-Based Learning Platform for kids.
Modéliste . Creative Pattern Cutter
Rails Programmer
Rails Programmer