This project has moved and is read-only. For the latest updates, please go here.

XMLHttpRequest from Javascript?

Jan 23, 2014 at 4:41 PM

How can I use XMLHttpRequest from a ClearScript Javascript function?

I'm aware that the Javascript engine only includes the very basic built-in functions, but I'd like to use it for http scripting.

Is there a way achieve this (other than implementing it in .Net and adding this object)?

Jan 23, 2014 at 7:54 PM
Edited Jan 23, 2014 at 7:54 PM
Hello Zcodez!

  1. ​Since you have .NET at your disposal, why not use something like System.Net.WebClient instead?
  2. If you're using JScript, you can use the COM implementation of XMLHTTPRequest via ActiveXObject.
  3. You can wrap the COM implementation of XMLHTTPRequest in a .NET class fairly easily.
  4. The next version of ClearScript will allow you to expose COM objects to any of the script engines.
Please send us your further questions or thoughts!
May 28, 2014 at 8:23 AM
you can make your own implementation
i did it, you can have if you would have