You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bob Paulin (Jira)" <ji...@apache.org> on 2020/06/08 20:02:00 UTC

[jira] [Created] (CAMEL-15163) Rest DSL Support for defaulting values for request headers

Bob Paulin created CAMEL-15163:
----------------------------------

             Summary: Rest DSL Support for defaulting values for request headers
                 Key: CAMEL-15163
                 URL: https://issues.apache.org/jira/browse/CAMEL-15163
             Project: Camel
          Issue Type: Improvement
          Components: rest
    Affects Versions: 2.25.1, 3.x
            Reporter: Bob Paulin


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:
{code:java}
@RequestMapping(value = "/test") 
public String test(@RequestHeader(value="X-SOME-HEADER", defaultValue="A VALUE") String someHeader){code}
 In camel this is possible however when the route is called the default value is not set from the rest definition.
{code:java}
.param()
  .name("X-SOME-HEADER")
  .type(RestParamType.header)
  .defaultValue("A VALUE")
.endParam(){code}
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)