Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-10878

camel-http / camel-http4 - Allow to specify HTTP operation as uri parameter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.19.0
    • camel-http-common
    • None
    • Moderate

    Description

      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

      from("direct:start")
        .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.POST))
        .to("http4://www.google.com")
        .to("mock:results");
      

      But it would be good if you can do

      from("direct:start")
        .to("http4://www.google.com?httpMethod=POST")
        .to("mock:results");
      

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: