When I try to connect my React client to Huobi websocket, connection immediately closing.
In nodejs I can connect to Huobi websocket without any configuration.
I've tried at postman and it connects.
Tried at https://www.piesocket.com/websocket-tester but it did throw same error and closed immediately. This is error: huobi websocket error at client
This is the sample code for both nodejs and clientside:
const websocket = new WebSocket("wss://api.huobi.pro/ws");
websocket.onopen = () => {
console.log("connected");
subscribe(websocket);
};