Web.Net.WebRequest() class in Atlas
I was talking to Wilco a while back and he said that the Completed event on the Web.Net.WebRequest() object takes two paramaters, just like in .NET. I wrote the code below to test it out and it seems to work properly. Now I can see which object instance actually instantiated the event.
var request;
function MakeCall()
{
request = new Web.Net.WebRequest();
var url = Web.Net.WebRequest.createUrl("http://.......", null);
request.set_url(url);
request.completed.add(RequestCompleted);
request.timeout.add(RequestTimeOut);
request.invoke();
}
function RequestCompleted(objSender, evArgs)
{
var obj = request.get_response();
debug.dump(evArgs, "event arguments", true);
debug.dump(objSender, "object sender", true);
}