I have a RESTful Play 2.0 application, and I'd like to call DELETE /sessions
from a link in the browser.
How do I do this? Rails has a convention of using a _method
query parameter for non-GET/POST requests, but Play's documents don't mention this.
Also, do I have to create a separate form or XMLHttpRequest
in order to invoke the method from a link's href
or is there something like Rails's data-method
attribute?
You will not do that with common link.
Cite from similar topic on Google Groups:
What is that mean: you need use GET to delete the item:
in
conf/routes
:in your view:
Or with AJAX call: