-
Notifications
You must be signed in to change notification settings - Fork 0
cristobal/AS3HTTPService
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
AS3 HTTPService Description: Mimics the mx.rpc.http.HTTPService class for AS3 Applications. By using the flash.net.URLLoader & flash.net.URLRequest classes. Example: import com.net.http.HTTPService; import com.net.rpc.events.ResultEvent; import com.net.rpc.events.FaultEvent; /** * Complete handler */ function handleComplete(result:ResultEvent):void { trace("Successfully loaded xml:"); trace(event.result); } /** * Fault handler */ function handleFault(event:FaultEvent):void { trace("Could not load xml"); trace(event.fault); } /* Initialize and set parameters*/ var url:String = 'http://example.com/destination'; var httpService:HTTPService = new HTTPService(); httpService.resultFormat = HTTPService.RESULT_FORMAT_XML; /* Add Event listeners */ httpService.addEventListener(ResultEvent.RESULT, handleComplete); httpService.addEventListener(FaultEvent.Fault, handleFault); /* Send the request */ httpService.send({"key": "value"});
About
HTTPService for AS3
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published