Update console.html

This commit is contained in:
Namhyeon Go 2024-06-20 17:01:32 +09:00 committed by GitHub
parent 6642750172
commit 472d989a17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,13 +29,17 @@
url: env.target,
type: 'POST',
contentType: 'application/json',
dataType: 'json',
data: JSON.stringify(requestData),
beforeSend: function(xhr) {
xhr.setRequestHeader("X-User-Agent", "php-httpproxy/0.1.5 (Client; WebConsole; abuse@catswords.net)");
},
success: function(response) {
var responseData = JSON.parse(response);
term.echo(responseData.result.data);
if (typeof response.result.data === "object") {
term.echo(JSON.stringify(response.result.data));
} else {
term.echo(response.result.data);
}
},
error: function(xhr, status, error) {
term.echo(error);