I have this reproducer, which send POST request. Consumer should receive some message, but it doesn't.
<restConfiguration component="restlet" host="localhost" port="9080" /> <route> <from uri="timer:x?repeatCount=1&delay=5000" /> <setBody> <constant>Hello world</constant> </setBody> <log message="body to send: ${body}" /> <to uri="rest://POST:/services:/contact-service/user" /> </route> <route> <from uri="restlet:http://localhost:9080/services/contact-service/user?restletMethods=POST" /> <log message="Request body: ${body} but should be Hello world" /> </route>
Problem you can see here: https://github.com/apache/camel/blob/c69affc49415b190645ce25536ffd62348c4fe34/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java#L290
Instead of == should be used .equals(). Because Karaf and its class loader makes that request.getMethod() and Method.POST IDs are different.
- is related to
-
ENTESB-9919 Restlet producer sending null body
- Closed