Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

DELETE Request

Delete a request

Description

Use a DELETE method to delete a request on the server. Once a request has been deleted, information about it cannot be retrieved.

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

Introduced in R2016b