I am working on building out a module that includes a GET and a POST method on an endpoint.
The GET endpoint is working great and just added with:
this.routes.newRoute("/my/endpoint")
.handler(this::getData)
.type(TYPE_JSON)
.mount();
However the same way of describing the POST endpoint doesn't seem to be working?
If I just execute a curl <my-path>/my/endpoint
then it works fine
However a curl -X POST -d @my-file.json <my-path>/my/endpoint
I get a 404 that the page isn't there.
Is there something different I need to add to the route definition for it to see the POST request?