S
S
sheeel2019-08-30 22:17:42
JavaScript
sheeel, 2019-08-30 22:17:42

How to connect to the website's websocket?

const WebSocket = require('ws');
const ws = new WebSocket("wss://betting-public-gql.gin.bet/graphql");

ws.on('message', msg => {
    console.log(msg);
});

ws.on('error', data => {
    console.log(data);
})

Error: Server sent a subprotocol but none was requested
help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question