Get the latest tech news
Making Libcurl Work in WebAssembly
We explain how to make libcurl based applications work in webassembly without changes by tunneling all traffic over a websocket proxy.
However it turns out there is a relatively simple way to make existing code work in WebAssembly, by letting libcurl route all traffic over a websocket based proxy server. If you have existing TCP networking code written in C/C++ that utilizes the Posix Sockets API, by default Emscripten attempts to emulate such connections to take place over the WebSocket protocol instead. This is a bit unfortunate because most browsers nowadays silently block http requests from webapps served on a https webpage due to mixed content security policies.
Or read this on Hacker News