Skip to main content
Santanu Karar
Known Participant
March 9, 2013
Question

URLLoader bug with AIR SDK

  • March 9, 2013
  • 1 reply
  • 1949 views

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 has been closed for replies.

1 reply

Santanu Karar
Known Participant
March 10, 2013

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

Pahup
Adobe Employee
Adobe Employee
March 11, 2013

Thanks for reporting, this is for iOS or Android?

-Pahup

Santanu Karar
Known Participant
March 11, 2013

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.