[GH-ISSUE #3311] [feature]: allow saving websocket messages (commands) into collections #1098

Open
opened 2026-03-16 18:33:04 +03:00 by kerem · 6 comments
Owner

Originally created by @SamJakob on GitHub (Sep 3, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3311

Is there an existing issue for this?

  • I have searched the existing issues

Summary

Similarly to how HTTP/REST requests may be saved to collections, it would be beneficial if WebSocket messages could get the same treatment.

I think this could be handled in one of two ways:

  • (preferred) save the endpoint (URL) and the body of the message into a collection entry.
    • When the entry is selected by the user, update the current endpoint to the specified URL.
    • Disconnect from an existing web-socket endpoint if already connected to one. Then, either way, if not connected to the endpoint, connect to it. (In other words, connect to the associated endpoint if not already connected).
    • (Whether the endpoint is automatically connected could be made into an option in settings).
  • (alternatively, but less usefully), simply save the body of the message
    • When the entry is selected set the current message body to that which was selected

Why should this be worked on?

When developing (and particularly iterating) WebSocket-based APIs, it is often necessary to re-input the same commands (which may be fairly long and non-trivial). This would improve the UX of doing so (as presently one must resort to having a list in a text document).

It would also lend itself to being able to better document and demonstrate WebSocket APIs.

Originally created by @SamJakob on GitHub (Sep 3, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3311 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Summary Similarly to how HTTP/REST requests may be saved to collections, it would be beneficial if WebSocket messages could get the same treatment. I think this could be handled in one of two ways: - _(preferred)_ save the `endpoint` (URL) and the body of the message into a collection entry. - When the entry is selected by the user, update the current endpoint to the specified URL. - Disconnect from an existing web-socket endpoint if already connected to one. Then, either way, if not connected to the endpoint, connect to it. (In other words, connect to the associated endpoint if not already connected). - (Whether the endpoint is automatically connected could be made into an option in settings). - _(alternatively, but less usefully)_, simply save the body of the message - When the entry is selected set the current message body to that which was selected ### Why should this be worked on? When developing (and particularly iterating) WebSocket-based APIs, it is often necessary to re-input the same commands (which may be fairly long and non-trivial). This would improve the UX of doing so (as presently one must resort to having a list in a text document). It would also lend itself to being able to better document and demonstrate WebSocket APIs.
Author
Owner

@0bvim commented on GitHub (Dec 27, 2024):

@SamJakob Can I work on it?

<!-- gh-comment-id:2563912287 --> @0bvim commented on GitHub (Dec 27, 2024): @SamJakob Can I work on it?
Author
Owner

@SamJakob commented on GitHub (Dec 27, 2024):

@0bvim - sure!

<!-- gh-comment-id:2564021153 --> @SamJakob commented on GitHub (Dec 27, 2024): @0bvim - sure!
Author
Owner

@0bvim commented on GitHub (Dec 29, 2024):

@0bvim - sure!

@SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong?

<!-- gh-comment-id:2564593704 --> @0bvim commented on GitHub (Dec 29, 2024): > @0bvim - sure! @SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong?
Author
Owner

@SamJakob commented on GitHub (Dec 29, 2024):

@SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong?

From memory, yes. I never got any feedback on it so I'm not sure if merging it was ever considered.

Also there's a handful of merge conflicts now that will need to be resolved (hopefully nothing major?).

<!-- gh-comment-id:2564783590 --> @SamJakob commented on GitHub (Dec 29, 2024): > @SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong? From memory, yes. I never got any feedback on it so I'm not sure if merging it was ever considered. Also there's a handful of merge conflicts now that will need to be resolved (hopefully nothing major?).
Author
Owner

@0bvim commented on GitHub (Dec 29, 2024):

@SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong?

From memory, yes. I never got any feedback on it so I'm not sure if merging it was ever considered.

Also there's a handful of merge conflicts now that will need to be resolved (hopefully nothing major?).

Idk the tools used in the front-end and I am 'new' in the area and I work with back-end for now. I am doing a project that has websocket calls, but I need to save them in the collection to be able to make them available to the public. Could you resolve these conflicts or could you give me some direction on what I can do?

<!-- gh-comment-id:2564799200 --> @0bvim commented on GitHub (Dec 29, 2024): > > @SamJakob I looked at the PR and basically all that's left is to review what was done, or am I wrong? > > From memory, yes. I never got any feedback on it so I'm not sure if merging it was ever considered. > > Also there's a handful of merge conflicts now that will need to be resolved (hopefully nothing major?). Idk the tools used in the front-end and I am 'new' in the area and I work with back-end for now. I am doing a project that has websocket calls, but I need to save them in the collection to be able to make them available to the public. Could you resolve these conflicts or could you give me some direction on what I can do?
Author
Owner

@nosovk commented on GitHub (Mar 18, 2025):

It would be nice to land that, and also to improve real-time tooling.

<!-- gh-comment-id:2732956074 --> @nosovk commented on GitHub (Mar 18, 2025): It would be nice to land that, and also to improve real-time tooling.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1098
No description provided.