3
votes

I'll try and keep this short.

I've written an AIR app that uses an HTTPService to request various bits of data. There can be multiple services firing at once, so I use the standard AsyncToken behaviour to set variables that can later be used to track what's happening when the call returns.

However, some people/places we're deploying to cannot directly see the server where the XML is held, though they can view its contents through Internet Explorer. Using URLLoader automatically uses IE's proxy settings, so switching to this class solved that problem. The issue with this is that it obviously doesn't support tokens.

Is there any way to force HTTPService to use IE's proxy settings? Or, is there an easy way to apply tokens to URLLoader? I've thought of a few ways (including extending the class), but I want to keep this as simple and clean as possible.

I've seen the discussion at Flex - URLLoader and HTTPService (amongst other questions and sites), but can't seem to find anything that directly answers what I'm after, so any help would be greatly appreciated.

1
I don't understand what the "Standard ASyncToken behaviour" is "to set variables that can be later used". URLLoader is still asynchronous and the complete method is similar to result; and there are also events similar to fault.JeffryHouser
This is pretty standard stuff, give it a google. You basically do a 'var token:AsyncToken = service.send();' when sending your request. Then, you attach properties to the token (token.name = "value";) straight after. Finally, you can retrieve these in your result method [var returnToken:AsyncToken = event.token; trace(returnToken.name);]. You can use this behaviour to store/track information about a call, and use this upon the result returning.Marc

1 Answers

0
votes

Have you tried using useProxy="true" on the HTTPService?