Just concatenate .url
and .data
property of the request object:
var str:String=req.url+'?'+req.data;
문제
Example of code:
var variables:URLVariables = new URLVariables();
variables.var1 = 123;
var req:URLRequest = new URLRequest('http://testdomain.com/api');
req.data = variables;
var loader:URLLoader = new URLLoader();
loader.load(req);
Okay, loader has executed request: http://testdomain.com/api?var1=123
.
How can I save this request to string? req
has url and variables but as separated data.
Thanks,
Nick
해결책
Just concatenate .url
and .data
property of the request object:
var str:String=req.url+'?'+req.data;