Request to localhost with URLLoader not working
Hello,
I'm trying to get a request to a localhost url to work but it doesn't seem to work with URLLoader though it does seem to work with the mx.rpc.http.HTTPServ class.
The following works
var httpServ:HTTPService = new HTTPService();
httpServ.method = "POST";
httpServ.contentType = "application/xml";
httpServ.url = "http://localhost:1813";
httpServ.send(requestData);
While this does not
var urlRequest:URLRequest = new URLRequest();
urlRequest.contentType = "application/xml";
urlRequest.url = "http://localhost:1813";
urlRequest.method = "POST";
var urlLoader:URLLoader = new URLLoader();
urlLoader.data = requestData;
urlLoader.load(urlRequest);
Can anyone tell me how to get the latter to work or why it's not working? It's giving me an IOErrorEvent. requestData is simply the request body in XML format
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:1813" errorID=2032]
Thanks,
Kyle
