删除请求
从服务器删除请求
描述
使用一个DELETE方法在服务器上删除请求。你不能检索信息的删除请求。
请求
HTTP方法
删除
URI
http://host {request-uri-string}
响应
成功
HTTP状态代码
204没有内容
错误
HTTP状态代码
404年RequestNotFound
409年RequestNotCompleted
-请求尚未达到终端状态。
410年RequestAlreadyDeleted
500年InternalServerError
示例调用
HTTP
要求: 删除/ ~ f76280c5 b94c - 4 cd9 - 8 eb6 - 841532788583 /请求/ 841532788583 b58 - 209 c - 4 - c41 - b3f8 - 6 e1e025f9c9b HTTP / 1.1主持人:localhost: 9910 回应: 状态码:204没有内容 |
JavaScript
var数据=零;var xhr = new XMLHttpRequest ();xhr。addEventListener (“readystatechange函数(){如果(这一点。readyState = = = 4) {console.log (this.responseText);}});xhr。open(“删除”、“http://localhost: 9910 / ~ f76280c5 b94c - 4 cd9 - 8 eb6 - 841532788583 /请求/ 841532788583 b58 - 209 c - 4 - c41 - b3f8 - 6 e1e025f9c9b”);xhr.send(数据); |
版本历史
介绍了R2016b