DELETE Request
从服务器删除请求
描述
使用 DELETE 方法删除服务器上的请求。您无法检索已删除的请求的信息。
请求
HTTP 方法
DELETE
URI
http://host:port/{request-uri-string}
响应
成功
HTTP 状态代码
204 No Content
错误
HTTP 状态代码
404 RequestNotFound
409 RequestNotCompleted
- 请求尚未达到终端状态。
410 RequestAlreadyDeleted
500 InternalServerError
示例调用
HTTP
请求: DELETE /~f76280c5-b94c-4cd9-8eb6-841532788583/requests/31577b58-209c-4c41-b3f8-6e1e025f9c9b HTTP/1.1 Host: localhost:9910 响应: Status Code: 204 No Content |
JavaScript
var data = null; var xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("DELETE", "http://localhost:9910/~f76280c5-b94c-4cd9-8eb6-841532788583/requests/31577b58-209c-4c41-b3f8-6e1e025f9c9b"); xhr.send(data); |
版本历史记录
在 R2016b 中推出