Using specific content type in Camel Rest DSL

Solution Unverified - Updated -

Issue

Configured consumes in REST DSL, but camel still accepts different content-types

<!-- ============== REST DSL ============== -->
<restConfiguration bindingMode="off" component="jetty"
  enableCORS="true" host="0.0.0.0" port="9000">
  <endpointProperty key="handlers" value="logger"/>
  <dataFormatProperty key="prettyPrint" value="true"/>
</restConfiguration>
<rest path="/private-api/v1">
   <post uri="/sample1" consumes="multipart/form-data"
      produces="applicatoin/json" >
      <to uri="direct:sample1"/>
  </post>
</rest>

Environment

  • Red Hat JBoss Fuse
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content