Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.20.1
-
None
-
Unknown
Description
Hi,
I have a REST resource with a GET method, defined using Rest DSL (and servlet component) and it works well, returning 200 response. But when I send a PUT request (which is not yet implemented) it returns 404 (not found) which can confusing at times. It should rather return 405 (method not allowed) instead.
restConfiguration()
.component("servlet")
.bindingMode(json)
.dataFormatProperty("prettyPrint", "true");rest("my-resource-url-here")
.get()
.consumes("application/json")
.produces("application/json")
.type(MyRequestClass.class)
.to("...")