How do i send content-type in Camel DELETE method. I have added the following way but It was not working correctly.
from(\"direct:start\")
.setHeader(Exchange.H
As in a delete operation, no content is sent, the Exchange.CONTENT_TYPE
property should not be needed.
Please, try
from("direct:start")
.setHeader(Exchange.HTTP_METHOD, simple("DELETE"))
.to("http://02.02.02.02:8080/rest/delete/student/688187");
or
from("direct:start")
.to("restlet:http://02.02.02.02:8080/rest/delete/student/688187?restletMethod=delete");
By the way, using delete
in the URL is not the RESTful way and should be ommited.
EDIT:
Camel does not transfer the body to the request of a DELETE
operation, as can be seen digging into the source code. Use a PUT
operation instead.
See my answer to your other SO.