Update http.js

This commit is contained in:
Namhyeon Go 2024-07-10 12:05:47 +09:00 committed by GitHub
parent 4716a3a39e
commit 840e3bfb4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,8 @@ var HTTPObject = function(engine) {
this.isCompressedResponse = false;
this.create = function() {
if (this.engine == "MSXML") {
switch (this.engine) {
case "MSXML":
_interface = CreateObject([
"Microsoft.XMLHTTP",
"WinHttp.WinHttpRequest.5.1",
@ -96,10 +97,19 @@ var HTTPObject = function(engine) {
"Msxml2.ServerXMLHTTP.4.0",
"Msxml2.ServerXMLHTTP.3.0"
]);
} else if (this.engine == "CURL") {
break;
case "CURL":
_interface = SHELL.create();
_interface.setPrefix("bin\\curl"); // the location of cURL binary
_interface.setPrefix("bin\\curl.exe"); // the location of cURL binary
break;
case "BITS":
_interface = SHELL.create();
_interface.setPrefix("bitsadmin.exe"); // the location of BITS binary
break;
}
return this;
};