Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I send a http delete request from browser?

Tags:

Is there a way to send a DELETE request from a website, using xmlhttprequest or something similar?

like image 869
Kalvaresin Avatar asked Dec 15 '09 16:12

Kalvaresin


People also ask

How will you send a delete request using HTTP URL connection?

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!

How do you delete a send request on Google Chrome?

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.


1 Answers

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);     } }); 
like image 85
Mike Trpcic Avatar answered Oct 03 '22 02:10

Mike Trpcic