This commit is contained in:
Yuri Kuznetsov
2022-10-24 16:44:33 +03:00
parent 4b038d66d1
commit 66a111d7fc
+18 -1
View File
@@ -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;