purescript-payload
purescript-payload copied to clipboard
Allow overriding default responses (404, 400, etc)
Hello, great work with the library. Is it possible to set the 404 response when none of the routes match?
You can make a catch-all route, e.g. GET "/<..unmatched>"
, that would catch all unmatched GET requests, and then return what you want from there. Of course, you would need to duplicate it for each HTTP method. Does this work for your use case or is there still need for something more specific?
I suppose this works fine for the simple need of sending back some html. Was just wondering if I missed something, thanks!