Hacker News new | ask | show | jobs
by Lt_Riza_Hawkeye 802 days ago
Curious about the choice to send requests with WebSocket connections instead of just plain old POST forms. This precludes anyone with javascript disabled from using any of these sites. I don't think there's anything in the business logic preventing it
2 comments

You can use http directly for your functions [1]. Or you can create custom http actions [2]. We encourage websocket usage because it allows for reactivity and UI consistency and it plays nicely with reactive frontend frameworks like React etc.

[1] https://docs.convex.dev/http-api/#functions-api [2] https://docs.convex.dev/functions/http-actions

Thank you!
HTTP handlers for requests can be defined, many Convex apps define these to handle webhook notifications and some apps consist primarily of these endpoints or app-specific REST APIs. (I work at Convex)

Edit: simultaneous post with my manager