You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl -X MYCUSTOMMETHOD http://127.0.0.1:8080
curl: (52) Empty reply from server
Edit and further considerations
After further reading and experimentation, it seems that Node.js has a list of supported verbs that cannot be extended either. If requests come in that do not fit within the supported list, they are dropped with a 400 Bad Request response.
I'm not championing custom HTTP verbs as a good design idea - but there are circumstances where older services cannot be cleanly ported to Bun (or Node.js for that matter) due to this limitation.
What is the feature you are proposing to solve the problem?
That custom request methods are allowed, and/or;
That the response to an unsupported method be more graceful. As noted in my edit above, Node.js sends a 400 Bad Request error before closing the connection.
Reacted by Andrey Shchukin, alina 🌸🦴, Kravets, Facundo Villa, Pablo Gutierrez, Julien Alric, Arpan M, Jimmy Choca and Roman
Activity
[-]Allow use of custom HTTP methods via Bun.serve()[/-][+]Custom HTTP methods via Bun.serve()[/+]