How can I send a http delete request from browser?

后端 未结 6 1913
一整个雨季
一整个雨季 2020-12-10 02:01

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

6条回答
  •  粉色の甜心
    2020-12-10 02:05

    This can be done with jQuery, if you don't mind the dependence on a framework. I believe jQuery uses XmlHttpRequest to perform this action. You'd use the $.ajax function with the type parameter set to DELETE.

    Please note that not all browsers support HTTP DELETE requests.

提交回复
热议问题