Main Content

POST Cancel Request

リクエストのキャンセル

説明

POST メソッドを使用してリクエストをキャンセルします。キャンセルできるのは、まだ完了していないリクエストのみです。

リクエスト

HTTP メソッド

POST

URI

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

レスポンス

成功

HTTP ステータス コード

204 No Content

エラー

HTTP ステータス コード

404 RequestNotFound

410 RequestAlreadyCompleted

410 RequestAlreadyCancelled

410 RequestAlreadyDeleted

500 InternalServerError

サンプル呼び出し

HTTP

リクエスト:

POST /~f76280c5-b94c-4cd9-8eb6-841532788583/requests/ef90fca4-0d3c-4395-8dc8-af8a8905b1fe/cancel 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("POST", "http://localhost:9910/~f76280c5-b94c-4cd9-8eb6-841532788583/requests/ef90fca4-0d3c-4395-8dc8-af8a8905b1fe/cancel");
xhr.send(data);

バージョン履歴

R2016b で導入