diff options
Diffstat (limited to 'web/share/js/kvm/gpio.js')
-rw-r--r-- | web/share/js/kvm/gpio.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js index b765820d..db259cee 100644 --- a/web/share/js/kvm/gpio.js +++ b/web/share/js/kvm/gpio.js @@ -209,13 +209,11 @@ export function Gpio(__recorder) { }; var __sendPost = function(url) { - let http = tools.makeRequest("POST", url, function() { - if (http.readyState === 4) { - if (http.status === 409) { - wm.error("Performing another operation for this GPIO channel.<br>Please try again later"); - } else if (http.status !== 200) { - wm.error("GPIO error:<br>", http.responseText); - } + tools.httpPost(url, function(http) { + if (http.status === 409) { + wm.error("Performing another operation for this GPIO channel.<br>Please try again later"); + } else if (http.status !== 200) { + wm.error("GPIO error:<br>", http.responseText); } }); }; |