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

Rest DSL Support for defaulting values for request headers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.25.1, 3.x
    • 3.4.0
    • rest
    • None
    • Unknown

    Description

      Within https://issues.apache.org/jira/browse/CAMEL-9312 support was added for defaulting query string values in the REST DSL. Other frameworks such as spring mvc also provide support for this in the request header fields:

      @RequestMapping(value = "/test") 
      public String test(@RequestHeader(value="X-SOME-HEADER", defaultValue="A VALUE") String someHeader)

       In camel this is possible however when the route is called the default value is not set from the rest definition.

      .param()
        .name("X-SOME-HEADER")
        .type(RestParamType.header)
        .defaultValue("A VALUE")
      .endParam()

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bob Bob Paulin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: