apidash
apidash copied to clipboard
Feature request: Websocket Support
I would love to have Websocket support. Is this on your roadmap?
Hi @4F2E4A2E, Thank you for raising this feature request. We do have Websocket support in our roadmap.
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
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?
Yes, @ashitaprasad! I have looked at Postman and Thunder Client. Are there any other tools that I should check out?
@ashitaprasad @animator Should I go ahead with the implementation outlined in the above sketch?
Yes @mmjsmohit You can go ahead and draft an initial implementation as shown in the sketch you provided.
@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?
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.
@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.
@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.
@mmjsmohit, you can go ahead and raise a PR.