Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.19.0
-
Component/s: camel-http4, rest
-
Labels:None
-
Estimated Complexity: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