Skip to main content
Santanu Karar
Known Participant
Mar 9, 2013 7:10 AM UTC
Question

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!

This topic is closed to new replies. Start a new post to keep the conversation going.

8 replies

Santanu Karar
Known Participant
Mar 10, 2013 6:15 AM UTC

(Update) The problem found persistent in AIR SDK 3.6 as well.

Translate
Pahup
Adobe Employee
Adobe Employee
Mar 11, 2013 4:15 AM UTC

Thanks for reporting, this is for iOS or Android?

-Pahup

Translate
Santanu Karar
Known Participant
Mar 11, 2013 4:25 AM UTC

Hello,

Though my project is targeted for all 3 platforms (iOS, Android & BB) but at this point I'm mainly concentrating on iOS release - so it was with iOS AIR simulator. I'm just curious, is that really supposed to be important (platform) because the class should work indifferently whichever the platform is

Thank you.

Translate