You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2017/02/22 13:02:44 UTC

[jira] [Commented] (CAMEL-10878) camel-http / camel-http4 - Allow to specify HTTP operation as uri parameter

    [ https://issues.apache.org/jira/browse/CAMEL-10878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15878148#comment-15878148 ] 

Claus Ibsen commented on CAMEL-10878:
-------------------------------------

We could then let httpMethod be optional, and let it do as today.

And if its declared then it take precedence, eg a HTTP header cannot override it?

> camel-http / camel-http4 - Allow to specify HTTP operation as uri parameter
> ---------------------------------------------------------------------------
>
>                 Key: CAMEL-10878
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10878
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-http-common
>            Reporter: Claus Ibsen
>             Fix For: 2.19.0
>
>
> Today HTTP clients do tend to guess if they should use GET or POST etc. And you can override this with a message header. But it would also be good to specify that explicit as an uri parameter,
> Today you have to do
> {code}
> from("direct:start")
>   .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.POST))
>   .to("http4://www.google.com")
>   .to("mock:results");
> {code}
> But it would be good if you can do
> {code}
> from("direct:start")
>   .to("http4://www.google.com?httpMethod=POST")
>   .to("mock:results");
> {code}



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