请问jQuery的AJAX在现代浏览器工作,PUT和DELETE?浏览器、现代、工作、AJAX

2023-09-10 13:25:06 作者:捂着心脏说胃疼

借助 jQuery的AJAX调用有一个键入参数允许指定的方法为异步调用( GET / POST / PUT / 删除);文件指出:

The jQuery AJAX call has a type parameter that allows to specify the method for an async call (GET/POST/PUT/DELETE); documentation states that:

的类型   要求来制作(POST或GET)   默认值是GET。注:其他HTTP   请求的方法,如PUT和   DELETE,也可以用在这里,但   它们不支持的所有   浏览器。

The type of request to make ("POST" or "GET"), default is "GET". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.

这是什么意思为现代浏览器?我能指望jQuery的AJAX进行全面REST风格的调用,这依赖于 PUT 删除动词?

What does this mean for modern browsers? Can I count on jQuery AJAX to make fully RESTful calls, which rely on the PUT and DELETE verbs?

推荐答案

是的。 $。阿贾克斯使得肮脏的工作,让PUT和DELETE。

Yes. $.ajax makes the dirty work to allow PUT and DELETE.

在这里你可以找到更多的信息:Are在PUT,DELETE,HEAD等在大多数Web浏览器可用的方法?

Here you'll find more info: Are the PUT, DELETE, HEAD, etc methods available in most web browsers?