GET Result of Request
リクエストの結果を取得する
説明
GET メソッドを使用して、サーバーからリクエストの結果を取得します。self
フィールドの URI は、メソッドのアドレス指定可能なリソースとして機能します。
以下のセクションでは、JSON をデータ シリアル化形式として使用します。Java® クライアント API で protobuf をデータ シリアル化形式として使用する方法を説明する例については、Retrieve the Results of a Requestを参照してください。
リクエスト
HTTP メソッド
GET
URI
http://host:port/{request-uri-string}/result
レスポンス
成功
HTTP ステータス コード
200 OK
本文
JSON で表される結果。
例:
{"lhs":[[[17,24,1,8,15],[23,5,7,14,16],[4,6,13,20,22],[10,12,19,21,3],[11,18,25,2,9]]]} |
エラー
HTTP ステータス コード
404 RequestNotFound
410 RequestAlreadyCompleted
410 RequestAlreadyCancelled
410 RequestAlreadyDeleted
500 InternalServerError
サンプル呼び出し
HTTP
リクエスト: GET /~f76280c5-b94c-4cd9-8eb6-841532788583/requests/ad063314-ebda-4310-b356-59420058c17c/result HTTP/1.1 Host: localhost:9910 レスポンス: Status Code: 200 OK {"lhs":[[[17,24,1,8,15],[23,5,7,14,16],[4,6,13,20,22],[10,12,19,21,3],[11,18,25,2,9]]]} |
JavaScript
var data = null; var xhr = new XMLHttpRequest(); xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("GET", "http://localhost:9910/~f76280c5-b94c-4cd9-8eb6-841532788583/requests/ad063314-ebda-4310-b356-59420058c17c/result"); xhr.send(data); |
バージョン履歴
R2016b で導入