I am trying to POST to a simple REST endpoint using Camunda and pass a String, but cannot seem to make it work.
Here is my spring boot controller -
@PostMapping(value=“/pie/test”)
public void test(@RequestBody String eventMessage) {
System. out .println("Here is the test String from Camunda: "+eventMessage);
}
Here is my modeller -
Here is how I am POSTing using insomnia to the Camunda start endpoint and getting a response
But the problem is, Its not sending the String to the controller. I am seeing this exception in the controller console log -
2019-05-30 16:47:05.116 WARN [PIE,5cf04149bdeeeb771519484aef6e7abc,1519484aef6e7abc,true] 9524 — [nio-8090-exec-8] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public void com.pie.controller.PieController.test(java.lang.String)]
Why would it not accept the String as the RequestBody? Any help would be appreciated!!