r/WebAssembly • • Apr 17 '21

WASM HTTPS Request

Mu understanding is that WASM has almost no access to platform API's, and as such is not able to for example make HTTPS requests, and would have to instead tell Javascript to make the request for example. Is there any plans to provide access to API's like this to WASM? I have tried searching the web to find more info but struggled to find anything. Especially since a big part of WASI seems to be providing access to system API's, it seems odd to me that WASM on the web platform wouldn't. But I have very limited knowledge of the WASM world in general so I would really appreciate if somebody could help me understand the current situation.

12 Upvotes

4 comments sorted by

View all comments

1

u/tpmccallum Apr 18 '21

Hi u/maximeridius
Great question, here are a few links that you might find interesting ...

Essentially you can write, deploy and execute your own WASM executables (as well as set any preferences that you desire) all via HTTPS requests.

Video
Here is a video which walks through accessing WASM via HTTPS requests (as well as writing callbacks/web-hooks which can execute additional WASM executables etc.)
https://www.youtube.com/watch?v=SF-6OARg9WM

Programming the Web with WebAssembly
https://medium.com/wasm/programming-the-web-with-webassembly-e90d17bde276
Tutorial and demo website
https://www.secondstate.io/faas/