URL Request with Post Data
var loader : URLLoader = new URLLoader();
var request : URLRequest = new URLRequest("http://somedomain.com/someurl.php");
request.method = URLRequestMethod.POST;
var variables : URLVariables = new URLVariables();
variables.requestParam1 = "value1";
variables.requestParam2 = "value2";
request.data = variables;
// Handlers
loader.addEventListener(Event.COMPLETE, oncomplete);
loader.load(request);
private function oncomplete(e : Event):void{
// whatever
}
Written by Jeremy Dowell
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#As3
Authors
Related Tags
#as3
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#