Making a POST request using Camel
<p>I have a camel route configured for reading from a JMS queue and POST it to a service. 
My route is :</p>

<pre><code>from("jms:queue")
.marshal()
.json(JsonLibrary.GSON)
.setHeader(Exchange.CONTENT_TYPE,constant("application/json"))
.setHeader(Exchange.HTTP_METHOD, constant("POST"))
.process(new Processor1())
.to("https4:xxxxxx?throwExceptionOnFailure=false")
.process(new MyProcessor())
</code></pre>

<p>My Configuration :</p>

<pre><code>HttpComponent httpc = getContext().getComponent("http4",HttpComponent.class);
httpc.setHttpConfiguaration(customHttpConfig())
</code></pre>

<p>and in customHttpConfig i set my auth details.</p>

<p>I am getting a 400 error from the server. But i am able to hit the server from Postman api and get successfull response.</p>

<p>In my Processor1 class ( before making the request), i am able to print the body of the message, which contains a json representation of my object.</p>

<p>But in the processor after the POST request, i am doing this and getting below responses:</p>

<pre><code>Message in = exchange.getIn();
in.getBody(String.class); // print the error code 400
HttpServletRequest request = in.getBody(HttpServletRequest.class)// This is null.
</code></pre>

<p>Anything i am doing wrong? Do i need to set the message Content to the body of my Post Request?</p>