I am using spring rest APIs and getting Http 405 error for all the POST methods.
I have following POST method,
@RequestMapping(value = "/GetPlanByBasicContext/", method = RequestMethod.POST)
public @ResponseBody Plan getPlanByBasicContext(@RequestBody BasicPlanContext basicPlanContext)
{
return planService.getPlanByBasicContext(basicPlanContext);
}
I am using fiddler to post the following request,
POST http://localhost:8080/now/Plan/GetPlanByBasicContext
{ "sourceLocation":"",
"destinationLocation":"",
"modeOfTransport":"car"
"budget":"any"
}
Same attributes are present in BasicPlanContext on the server, along with getters and setters.
I have tried other solutions mentioned and nothing has worked.
Note: Security is not configured for spring yet.