When I connect to a website who uses websockets, I can get the frames with the Google Developer Tools.
Data from the websocket url
So I would like to get the same data but in a program ( JS, C# ) but I actually have no idea how I should do.
I thought about make a http.request with NodeJS but it's not a http url :/ I thought about make a sample JS client but I couldn't get the data because I wasn't able to send the headers with the 'key'.
The headers
So, I really hope you have a way to help me and sorry for my basic English :(
The URL to which to connect; this should be the URL to which the WebSocket server will respond. This should use the URL scheme wss://, although some software may allow you to use the insecure ws:// for local connections.
WebSocket is especially great for services that require continuous data exchange, e.g. online games, real-time trading systems and so on. To open a websocket connection, we need to create new WebSocket using the special protocol ws in the url: There’s also encrypted wss:// protocol.
The WebSocket.url read-only property returns the absolute URL of the WebSocket as resolved by the constructor. A DOMString. The compatibility table on this page is generated from structured data.
It has its own protocol ws:// and wss:// (like https:// ). What you need is a proper WebSocket client to receive data from the server. The problem here is WebSockets it's not a protocol per se. There's no concept of request and response. It's like working with TCP sockets. If you want to work with WebSockets, NodeJS has Socket.IO client API.
WebSockets is a standard technology to implement stateful, persistent connections between clients and servers. It has its own protocol ws://
and wss://
(like https://
).
What you need is a proper WebSocket client to receive data from the server.
The problem here is WebSockets it's not a protocol per se. There's no concept of request and response. It's like working with TCP sockets.
If you want to work with WebSockets, NodeJS has Socket.IO client API.
In C#, you should take a look at SignalR.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With