Camel undertow component forces to set "text/plain" even Rest DSL sets "application/json" to "produces" option

Solution Verified - Updated -


Even Rest DSL sets "application/json" to "produces" option, camel-undertow overrides the content-type header values with "text/plain" when the exchange body is null.

    <camelContext id="camel" xmlns="">
        <restConfiguration bindingMode="auto" component="undertow"
            contextPath="test" host="localhost" port="8005"/>
        <rest id="rest-0b0215bd-f133-46f8-968c-4fe21ba4af4f" path="demo">
            <get id="get-1" produces="application/json" uri="/ping">
                    <to uri="direct:hello"/>
        <route id="simple-route">
            <from id="_from1" uri="direct:hello"/>
            <setBody id="_setBody1">
            <log id="route-log" message=">>> ${body}"/>


  • Red Hat Fuse
    • 7.7

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