Is it possible to write scripts for websocket connections?

The reason I need this because the data stream is compressed, and it would be really convenient to be able to decompress them and see the incoming data.

For now I was not able to find anything that would help me to do that in the Postman yet.

If Postman somehow allows this, is there any way? I searched and couldn’t find how.

Thanks in advance!

Yes — you can write scripts for WebSocket connections in some tools, but Postman unfortunately does not currently support scripting for WebSockets in the same way it does for HTTP requests (with Pre-request and Test scripts).