Hi, 
I'm testing REST DSL like this.

{code}
        <rest>
            <verb method="post" uri="/books" 
                       type="com.buildria.camel.rest.Book" 
                       outType="com.buildria.camel.rest.Book">
                <to uri="direct:postBook" />
            </verb>
        </rest>
{/code}

and I've invoked the following command.

{code}
$ curl  'http://localhost:8888/books/' --include --request POST \
         --header 'Accept: application/xml' \
         --header 'Content-Type: application/json' \
         - -data-binary '{ "id": 100, "title": "Camel", "price": 300 }'

HTTP/1.1 200 OK
Content-Type: application/json                                         ...
(1)
Accept: application/xml                                    
breadcrumbId: ID-lily-50699-1454646457713-0-8
User-Agent: curl/7.41.0
Transfer-Encoding: chunked
Server: Jetty(9.3.5.v20151012)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<book id="6">
    <price>300</price>
    <title>Camel</title>
</book>
{code}
  
I can get a response as XML, but Content-Type of response (1) is
"application/json".
It should be "application/xml"?

Thanks,
--
Seiji Sogabe






--
View this message in context: 
http://camel.465427.n5.nabble.com/Invalid-Content-Type-Header-is-configured-tp5777250.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to