The RED.httpNode.get
works fine and I can register a new endpoint.
2021-01-18 update:
Questions
- How can I remove that endpoint?
- Is there anywhere a list what endpoints are already defined?
- What happens if an endpoint is define multiple times?
The RED.httpNode.get
works fine and I can register a new endpoint.
2021-01-18 update:
Questions
Hi @hklages
unfortunately, the Express library we use doesn't provide a convenient API for removing routes. You can see how the HTTP In node tidies up its routes here: node-red/21-httpin.js at master · node-red/node-red · GitHub
You will see that delves into the internals of Express to do the work via RED.httpNode._router.stack
If an endpoint is defined multiple times, then which was registered first will handle the request. If it doesn't respond to the request, it will fall to the next route that matches the request - and so on, down the stack.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.