diff --git a/client/src/ajax.js b/client/src/ajax.js index 250430b34c..88e3244070 100644 --- a/client/src/ajax.js +++ b/client/src/ajax.js @@ -181,17 +181,34 @@ define('ajax', [], function () { this.xhr = xhr; } + /** + * @param {string} name + * @return {string} + */ getResponseHeader(name) { return this.xhr.getResponseHeader(name); } + /** + * @return {Number} + */ getStatus() { return this.xhr.status; } - getParsedBody() { + /** + * @return {*} + */ + getResponseParsedBody() { return this.xhr.responseJSON; } + + /** + * @return {string} + */ + getResponseBody() { + return this.xhr.responseText; + } } return Ajax;