I’m not sure it makes sense use TykMakeHttpRequest for a ws connection. TykMakeHttpRequest expects a json string as it’s argument, and should be able to deserialise it. If the JSVM is unable to deserialise it, you should see an error in the gateway logs:
JSVM: Failed to deserialise HTTP Request object
You can however create an API within Tyk who’s upstream target is something like:
You should then be able to get a client to connect with your ws server via the gateway. The gateway should be able to upgrade the connection.
"enable_websockets": true is set within your