Skip to main content
Source Link
abiieez
  • 3.2k
  • 15
  • 63
  • 111

Spring REST for DELETE Request Method

I have the following method in my controller

@RequestMapping(value = "processPurchase/{poid}", method = RequestMethod.DELETE) public String processOrder(@PathVariable int poid) { // do some processing return acceptPurchaseForm; } 

My HTML

<form id="purchase-list-form" class="form-horizontal" action="/MyNewApp/processPurchase/" method="post"> <input type="hidden" name="_method" value="delete"> <input type="hidden" name="poid" value=""> 

With the above I still get the following error

WARN : org.springframework.web.servlet.PageNotFound - Request method 'DELETE' not supported

Any help appreciated.