I need help creating a POST request to my Java Spring Restcontroller.
This is my controller -
@RestController
@RequestMapping("hedgesimulator/")
public class HedgeSimulatorController {
@RequestMapping(value = "hedgesim/", method = RequestMethod.POST)
@ResponseBody
public HedgeSimulatorLog putHedgeSimulation(
@RequestBody HedgeSimulatorLog hedgeSimulatorLog) {
System.out.println(hedgeSimulatorLog.toJsonString());
return hedgeSimulatorLog;
}
}
I am using Chrome's "Advanced Rest Client" Plugin to POST my request to my URL (I am sure my localhost is running properly, etc.)
What do I need to add to my header?
I receive an error for "HTTP 400 - Status report: The request sent by the client was syntactically incorrect"
Please help!