Is there a way to send a DELETE request from a website, using xmlhttprequest
or something similar?
there is a simple way for delete and put request, you can simply do it by adding a " _method " parameter to your post request and write " PUT " or " DELETE " for its value!
Type the url in the main input field and choose the method to use: GET/POST/PUT/DELETE/PATCH. Click on the arrow "Send" or press Ctrl+Enter.
As someone mentioned above, jQuery will do this for you, via the following syntax:
$.ajax({ type: "DELETE", url: "delete_script.php", data: "name=someValue", success: function(msg){ alert("Data Deleted: " + msg); } });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With