I have the following RequestMapping I am testing:
@RequestMapping(value="/review", method=RequestMethod.POST)
public String reviewData( HttpServletRequest request,
HttpServletResponse response,
HttpSession session,
@RequestBody HashMap<String, Object> data,
@CurrentUser User user) throws Exception {
System.out.println("Hello World!");
}
I am testing this code expecting data to be POSTed to it from a vendor's API; which I have confirmed through their documentation andbased on conversations with their developers. Despite this I am receiving a 405 error:
Request method 'GET' not supported
I am at a lose as to the problem and am open to suggestions. I am actually wonder if the following RequestMapping would work properly to remediate this?
@RequestMapping(method = {RequestMethod.GET, RequestMethod.POST})