0
votes

My apache camel driven application sends HTTP POST ( with body ) call to a web server. But after I change the web server url to following, camel jetty converts my POST into a GET request ( without body ) and sends to the endpoint where is fails as web server expects a POST requests. How do I prevent this conversion ?

http://localhost:9080/partner/listener/mmsTPA/?apikey=af85c412-844a-f507f4cdc9d5

Note : There is a "?" in the url as it is a legacy system

1
You can tell Camel to use POST by setting a header CamelHttpMethod=POST.Claus Ibsen
Thanks. I have not set the CamelHttpMethod header in correct location of my codeNishantha Pradeep

1 Answers

0
votes

Got it resolved after reading through

createMethod() of org.apache.camel.component.http.helper.HttpHelper.java file. 

I have not set the CamelHttpMethod header in correct location of my code.