URLLoader bug with AIR SDK
Environment:
Flash Builder 4.7
AIR SDK 3.4
Mobile ActionScript project
Problem severity:
Use URLLoader class to get data from server; use URLVariables to send data containing a single field (Note, this issue happens only when you're sending only one field), as:
var urlVariables : URLVariables = new URLVariables();
urlVariables.contactid = "mycontactid";
var request : URLRequest = new URLRequest();
request.data = urlVariables;
request.url = "https://myserver.com/flex/GetContactDocument?OpenAgent";
var loader : Loader = new URLLoader();
loader.addEventListener( Event.COMPLETE, onSuccess );
loader.addEventListener( IOErrorEvent.IO_ERROR, onIOError );
loader.load( request );
Everytime it turns into IOErrorEvent returning stream error with the used URL path. I eventually noticed it didn't add any "&" after the URL! So what was supposed to be is this:
https://myserver.com/flex/GetContactDocument?OpenAgent&contactid=mycontactid
But instead URLLoader seeing this as:
https://myserver.com/flex/GetContactDocument?OpenAgentcontactid=mycontactid
Note, there's no & sign after OpenAgent word!
This doesn't happens when there are more then 1 fields in URLVariables class! This is strange, and looks like a bug to me!
Any suggestion would be appreciated. Thanks!
