Simplified endpoint listener
Last updated
Last updated
[io/http/server/Simplified endpoint listener]
Opinionated version of io/http/server/Endpoint listener
.
Sets up a listener on an HTTP route, and handles bad request errors. Starts an Express server if one is not started yet.
Possible error responses:
{ "status": 400, "headers": {}, "body": "Bad request" }
{ "status": 403, "headers": {}, "body": "Unauthorized" }
Keywords: http, server, endpoint, get, post, put, delete, listen, api, opinionated, error handling
response:
params:
request: