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

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

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.19.0
    • Component/s: camel-http-common
    • Labels:
      None
    • Estimated Complexity:
      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

            • Assignee:
              ancosen Andrea Cosentino
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: