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 · 18 comments · May be fixed by #555
Open

Feature request: Websocket Support #15

4F2E4A2E opened this issue Apr 22, 2023 · 18 comments · May be fixed by #555
Labels

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.

@animator animator linked a pull request Feb 28, 2024 that will close this issue
5 tasks
@Clasherzz Clasherzz mentioned this issue Dec 27, 2024
9 tasks
@Clasherzz
Copy link
Contributor

@ashitaprasad I would like to contribute on this and have some previous experiences working on websocket projects and understand the codebase well enough to make an approach. Is the feauture currently under development and is free to work on?

@ashitaprasad
Copy link
Member

@Clasherzz You are free to work on this feature .. it is recommended that you share the feature designs first.

@Clasherzz
Copy link
Contributor

Clasherzz commented Jan 15, 2025

Image

@Clasherzz
Copy link
Contributor

Clasherzz commented Jan 15, 2025

@ashitaprasad looking forward to implement some cards for each messages . Each card could be expaned to see the contents . would have incoming / outtgoing arrow. Messages would have unique ids based on their time stamp which can be used for deletion.
The params and headers are disabled after the initial hanshake . The message would have dropdown supporting text and binary .

Looking forward to use https://fluttergems.dev/packages/web_socket_channel/ . This got all the functionalities we needed and also is the most used one for our need.

Now would it possible to know whether this feauture is being implemented from the organizations side and whether its almost being done completed. I would like to know of this because the earlier PR i worked on graphql was closed suddenly. I would like to participate in next gsoc and I would like to submit a good quality PR essential to the organization to improve my profile. But if the feauture is closed at the last moment then I would be left with no PRs to show my work . Hope you understand.

@ashitaprasad
Copy link
Member

Hi @Clasherzz, The PR with the best solution is always accepted into the project whether it comes from the maintainers or other contributors. Also, we follow certain guidelines while accepting PRs like code maintainability, whether it is scalable, whether the code submitted is clean, amount of code changes done and how well tested the code is. We provided you feedback on your PR along these aspects and we recommend you to learn from this feedback. Since, it is an open source project we cannot guarantee whether other contributors will not work on the same issue.

@Clasherzz
Copy link
Contributor

Clasherzz commented Jan 15, 2025

@ashitaprasad no i didnt mean to sound prude. I am fully aware that many people can work on the same issue at the time and the best one would be choosen. The thing with the last PR was that it was a direct PR from you . So i thought i can ask you directly if this being worked on by your side and if it is in late stages of finishing, which i hope is not a wrong question to ask.

@ashitaprasad also i would love to know if the implementation i mentioned above is something i can work on.

@Clasherzz
Copy link
Contributor

Clasherzz commented Jan 19, 2025

New layout @ashitaprasad

Image

@Clasherzz Clasherzz linked a pull request Feb 1, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants