# Is it possible to write scripts for websocket connections?

**URL:** <https://community.postman.com/t/is-it-possible-to-write-scripts-for-websocket-connections/81812>\
**Category:** Help Hub\
**Tags:** tests, scripts, websockets\
**Created:** [July 2, 2025, 3:07pm UTC](https://community.postman.com/t/is-it-possible-to-write-scripts-for-websocket-connections/81812 "2025-07-02T15:07:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![security-participan1](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@security-participan1](https://community.postman.com/u/security-participan1)\
**Post date:** [July 2, 2025, 3:07pm UTC](https://community.postman.com/t/is-it-possible-to-write-scripts-for-websocket-connections/81812/1 "2025-07-02T15:07:44Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![security-operator-91](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@security-operator-91](https://community.postman.com/u/security-operator-91)\
**Post date:** [August 12, 2025, 2:01pm UTC](https://community.postman.com/t/is-it-possible-to-write-scripts-for-websocket-connections/81812/2 "2025-08-12T14:01:17Z")

</div>

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).
