wasmedge-quickjs icon indicating copy to clipboard operation
wasmedge-quickjs copied to clipboard

Consider mimicking the browser's `fetch` API for `http_module`

Open joepio opened this issue 3 years ago • 2 comments

Hi there, I'm really impressed with this project! I'm looking for a WASM or JS runtime to create a plugin system for Atomic Server, and this looks very interesting.

I'd love to be able to use my existing JS / Node library in here, but that one currently depends on having some form of fetch - either from window or from node.

I was wondering whether it would be possible to mimick the browser's fetch API for the GET / POST part of the http_module, so it would be a drop-in replacement. That would allow users to run many existing libraries in this runtime.

Good luck with this project!

joepio avatar Jan 11 '22 12:01 joepio

Hi @joepio

This is partially done. Please give it a try and let us know your thoughts.

https://wasmedge.org/book/en/dev/js/fetch.html

Would love to see applications you build with it!

juntao avatar Jan 28 '22 08:01 juntao

That's great to hear! I'll definitely give it a try soon :)

joepio avatar Jan 28 '22 09:01 joepio