-
-
Notifications
You must be signed in to change notification settings - Fork 150
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
how to integrate websockets, should the need arise? #570
Comments
@VuongUranus you have full access to the underlying router and can use any websocket library compatible with your router choice (or the router itself it it supports websockets directly). If you want some of the Huma goodies like validation of request inputs then you can take a look at the SSE package as it implements SSE support on top of a streaming response within Huma: https://github.com/danielgtaylor/huma/blob/main/sse/sse.go and https://huma.rocks/features/server-sent-events-sse/. |
It would be great if web socket + AsyncAPI 2.x is supported out of box though. For the time being, the above trick would do. Async API: https://www.asyncapi.com/en |
I think this needs to be added from multiple perspectives :
|
I would be open to someone adding support for this to Huma if it makes sense, otherwise this could maybe be an additional library on top of or next to Huma. I'm not super familiar with AsyncAPI so would love to see some examples of how you expect to use it with Huma 👍 |
how to integrate websockets, should the need arise?
The text was updated successfully, but these errors were encountered: