Webassembly HttpRequest

Is it possible to do a HttpRequest from a Webassembly?

Hi, currently we can do using:

like this:
var lContent := WebAssembly.AjaxRequestBinary(‘wasm/hello.txt’);
var lInput := new MemoryStream(); // save content to a memoryStream
lInput.Write(lContent, 0, lContent.Length);

right now we support synchronous calls, we are working to improve this including async mode, we will update here when done.


1 Like

You can also do:

var req := WebAssembly.Eval('new XMLHttpRequest()');

Then req essentially can do anything xmlhttprequest can do in Javascript.

Latest IslandRTL (fridays build) can do:

WebAssembly.NewXMLHttpRequest() to return the same object.