12-19-2010 05:46 PM
Has anyone had problems getting a valid response from a website using URLLoader when in PB, but the same code works fine in the AIR version? Been nocking my head on this one all day.
var req:URLRequest = new URLRequest(); req.method = "GET"; req.url = my_uri; // like http://www.myhost.com?param1=square¶m2=circle var loader: URLLoader = new URLLoader(); loader.addEventListener( Event.COMPLETE, httpRequestTokenResult ); loader.addEventListener( IOErrorEvent.IO_ERROR, httpRequestTokenFault ); loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, httpRequestTokenFault ); loader.load( req );
12-19-2010 10:16 PM
I have no problems with that code here, and I get a "complete" event a fraction of a second after executing it.
I guess check the obvious: DNS, that the page really exists, maybe try without the query string (parameters) first, try another site. Failing, that, maybe post more detail about what invalid response you are getting...
12-20-2010 08:09 AM
I'll dig deeper. It's apart of OAuth code. Thanks.