Retrieve the results of a request
Use a GET method to retrieve the results of a request from the
server. The URI of the self
field serves as the
addressable resource for the method.
GET
http://host:port/{request-uri-string}/result
200 OK
Results represented in JSON.
Example:
{"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]]]} |
404 RequestNotFound
410 RequestAlreadyCompleted
410 RequestAlreadyCancelled
410 RequestAlreadyDeleted
500 InternalServerError
Request: GET /~f76280c5-b94c-4cd9-8eb6-841532788583/requests/ad063314-ebda-4310-b356-59420058c17c/result HTTP/1.1 Host: localhost:9910 Response: 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]]]} |
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); |