I'm working on a web-based visualization system for MUDding, with command and control from a web interface. The system runs with WebSockets, authenticated via an "Authorization" header and an API-KEY. I did some basic work to get this functional in Mudlet using the Websocat utility, listed on GitHub for many OS types and source code (direct links not allowed).
ws = spawn(function() end, "websocat",
"wss://url",
"-H",
"Authorization: API-KEY <<secret key>>")
After this, can use ws.send() to send information from your session to the websocat, and the function can be replaced to parse information coming back. A sample screenshot from a browser is attached, the text field will submit commands back to the mud client. I pass simple key/value pairs to populate the web components in real-time.
Hope this helps someone.