Main Content

DELETE Request

Delete request from server

Description

Use a DELETE method to delete a request on the server. You cannot retrieve the information of a deleted request.

Request

HTTP Method

DELETE

URI

http://host:port/{request-uri-string}

Response

Success

HTTP Status Code

204 No Content

Error

HTTP Status Code

404 RequestNotFound

409 RequestNotCompleted— Request has not reached terminal state.

410 RequestAlreadyDeleted

500 InternalServerError

Sample Call

HTTP

Request:

DELETE /~f76280c5-b94c-4cd9-8eb6-841532788583/requests/31577b58-209c-4c41-b3f8-6e1e025f9c9b HTTP/1.1
Host: localhost:9910

Response:

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);

Version History

Introduced in R2016b