camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-11293) Rest DSL Producer HTTP ignores http verb from uri
Date Mon, 22 May 2017 16:12:04 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-11293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen updated CAMEL-11293:
--------------------------------
    Component/s: rest

> Rest DSL Producer HTTP ignores http verb from uri
> -------------------------------------------------
>
>                 Key: CAMEL-11293
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11293
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http4, rest
>    Affects Versions: 2.19.0
>            Reporter: Owain McGuire
>             Fix For: 2.19.1, 2.20.0
>
>
> As per http://camel.465427.n5.nabble.com/2-19-0-Rest-Producer-DSL-http4-support-for-PUT-workaround-td5799706.html
> https://github.com/apache/camel/blob/camel-2.19.x/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpMethodHelper.java#L64
> 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



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message