Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Websocket Support #15

Open
4F2E4A2E opened this issue Apr 22, 2023 · 11 comments
Open

Feature request: Websocket Support #15

4F2E4A2E opened this issue Apr 22, 2023 · 11 comments
Labels
enhancement New feature or request good first issue Good for newcomers priority: high

Comments

@4F2E4A2E
Copy link

I would love to have Websocket support.
Is this on your roadmap?

@4F2E4A2E 4F2E4A2E added the enhancement New feature or request label Apr 22, 2023
@ashitaprasad
Copy link
Member

Hi @4F2E4A2E,
Thank you for raising this feature request. We do have Websocket support in our roadmap.

@mmjsmohit
Copy link
Contributor

WebSocket Implementation Request Model:

The request model for implementing WebSocket should include the following parameters:

  • url
  • name
  • description
  • requestTabIndex
  • requestHeaders
  • requestParams
  • requestBody
  • requestBodyContentType

Additionally, each request model should have a corresponding responseModel to capture the received response from the sent requests.

Response Handling:

We can maintain a list of such requests, which can be displayed in the response pane alongside the corresponding response. Each response should consist of:

  • message
  • status

Interface Sketch:

For a visual representation, please refer to the rough sketch of the interface. I have also included some more details in the sketch: Sketch

@ashitaprasad
Copy link
Member

Hi @mmjsmohit,
Thanks for taking up this issue and posting and initial draft of implementation details.
Did you get a chance to take a look at other GUI API clients to understand the different features people use to test WebSocket?

@mmjsmohit
Copy link
Contributor

Yes, @ashitaprasad! I have looked at Postman and Thunder Client. Are there any other tools that I should check out?

@mmjsmohit
Copy link
Contributor

@ashitaprasad @animator Should I go ahead with the implementation outlined in the above sketch?

@animator
Copy link
Member

Yes @mmjsmohit You can go ahead and draft an initial implementation as shown in the sketch you provided.
Untitled-2024-02-24-2211-2

@mmjsmohit
Copy link
Contributor

@animator @ashitaprasad I made respectable progress in solving the issue. During the process, I realized that the response models for WebSocket and HTTP requests differ. Should I create new models for each protocol?

@ashitaprasad
Copy link
Member

Yes @mmjsmohit the request and response models for WebSocket will be different.
You need to create a new folder inside models for websocket and keep the relevant models inside it.

@sebastianbuechler
Copy link

@animator @ashitaprasad I made respectable progress in solving the issue. During the process, I realized that the response models for WebSocket and HTTP requests differ. Should I create new models for each protocol?

Sorry @mmjsmohit, I did not see your message as I was already playing with the implementation. I opened up a PR with a working example and some explanation.

@mmjsmohit
Copy link
Contributor

mmjsmohit commented Feb 26, 2024

@animator @ashitaprasad I made respectable progress in solving the issue. During the process, I realized that the response models for WebSocket and HTTP requests differ. Should I create new models for each protocol?

Sorry @mmjsmohit, I did not see your message as I was already playing with the implementation. I opened up a PR with a working example and some explanation.

I have also already implemented the whole feature and updated @animator and @ashitaprasad on Discord about the same.

Please let me know if I should open a PR or not.

@ashitaprasad
Copy link
Member

@mmjsmohit, you can go ahead and raise a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers priority: high
Projects
None yet
5 participants