Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.19.0
-
None
-
Unknown
Description
The createMethod function does not take the http verb from the URI, PUT is transformed to a POST since there is a payload. Resulting in an incorrect http request being formed. The verb from the URI should take precedence.
There is a workaround of setting Exchange.HTTP_METHOD header as per:
.setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.PUT))
.to("rest:put:api/resource/resource.id")
HttpHelperTest is lacking coverage of http verbs other than GET and POST