mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-21 22:19:59 +01:00
more debug
This commit is contained in:
@@ -28,10 +28,12 @@ function showMessage(msg, closeAfter){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getResponse(adr, callback, timeoutCallback, timeout, method){
|
||||
|
||||
if(timeoutCallback === undefined) {
|
||||
timeoutCallback = function(){
|
||||
showMessage("error loading "+adr);
|
||||
showMessage("Timeout loading "+adr);
|
||||
};
|
||||
}
|
||||
if(timeout === undefined) timeout = 8000;
|
||||
@@ -49,4 +51,12 @@ function getResponse(adr, callback, timeoutCallback, timeout, method){
|
||||
xmlhttp.send();
|
||||
xmlhttp.timeout = timeout;
|
||||
xmlhttp.ontimeout = timeoutCallback;
|
||||
|
||||
xmlhttp.onabort = function(e) {
|
||||
showMessage("ABORT "+adr);
|
||||
};
|
||||
xmlhttp.onerror = function(e) {
|
||||
showMessage("ERROR loading "+adr +" :: "+ this.statusText);
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user