[ 
https://issues.apache.org/jira/browse/CAMEL-10633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

james strachan updated CAMEL-10633:
-----------------------------------
    Description: 
if you marshal to json then send to a HTTP endpoint you'll be missing the fact 
that the payload is now in JSON format. It seems a reasonable default to add 
this - so that a HTTP endpoint can know it can parse the payload as JSON.

e.g.
{code}
from("activemq:foo.bar").
  to("dataformat:json-jackson:marshal").
    /// TODO camel should now expose that the content type is json
  to("http://foo.bar/";)
{code}

  was:
if you marshal to json then send to a HTTP endpoint you'll be missing the fact 
that the payload is now in JSON format. It seems a reasonable default to add 
this - so that a HTTP endpoint can know it can parse the payload as JSON.

e.g.
{code}
from("activemq:foo.bar").
  to("dataformat:json-jackson:marshal").
    /// TODO camel should now expose that the content type is json
  to("http://foo.bar/";)
{code{


> json dataformat should set a header "Content-Type: application/json" if 
> there's no "Content-Type" header set
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10633
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10633
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: james strachan
>
> if you marshal to json then send to a HTTP endpoint you'll be missing the 
> fact that the payload is now in JSON format. It seems a reasonable default to 
> add this - so that a HTTP endpoint can know it can parse the payload as JSON.
> e.g.
> {code}
> from("activemq:foo.bar").
>   to("dataformat:json-jackson:marshal").
>     /// TODO camel should now expose that the content type is json
>   to("http://foo.bar/";)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to