mirror of
https://github.com/gnh1201/caterpillar.git
synced 2025-09-06 09:51:06 +00:00
Update console.html
This commit is contained in:
parent
6642750172
commit
472d989a17
|
@ -29,13 +29,17 @@
|
||||||
url: env.target,
|
url: env.target,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
|
dataType: 'json',
|
||||||
data: JSON.stringify(requestData),
|
data: JSON.stringify(requestData),
|
||||||
beforeSend: function(xhr) {
|
beforeSend: function(xhr) {
|
||||||
xhr.setRequestHeader("X-User-Agent", "php-httpproxy/0.1.5 (Client; WebConsole; abuse@catswords.net)");
|
xhr.setRequestHeader("X-User-Agent", "php-httpproxy/0.1.5 (Client; WebConsole; abuse@catswords.net)");
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
var responseData = JSON.parse(response);
|
if (typeof response.result.data === "object") {
|
||||||
term.echo(responseData.result.data);
|
term.echo(JSON.stringify(response.result.data));
|
||||||
|
} else {
|
||||||
|
term.echo(response.result.data);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function(xhr, status, error) {
|
||||||
term.echo(error);
|
term.echo(error);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user