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,28 +78,38 @@ var HTTPObject = function(engine) {
this.isCompressedResponse = false;
this.create = function() {
if (this.engine == "MSXML") {
_interface = CreateObject([
"Microsoft.XMLHTTP",
"WinHttp.WinHttpRequest.5.1",
"Msxml3.XMLHTTP",
"Msxml2.XMLHTTP",
"Msxml2.XMLHTTP.7.0",
"Msxml2.XMLHTTP.6.0",
"Msxml2.XMLHTTP.5.O",
"Msxml2.XMLHTTP.4.O",
"Msxml2.XMLHTTP.3.O",
"Msxml2.XMLHTTP.2.6",
"Msxml2.ServerXMLHTTP",
"Msxml2.ServerXMLHTTP.6.0",
"Msxml2.ServerXMLHTTP.5.0",
"Msxml2.ServerXMLHTTP.4.0",
"Msxml2.ServerXMLHTTP.3.0"
]);
} else if (this.engine == "CURL") {
_interface = SHELL.create();
_interface.setPrefix("bin\\curl"); // the location of cURL binary
switch (this.engine) {
case "MSXML":
_interface = CreateObject([
"Microsoft.XMLHTTP",
"WinHttp.WinHttpRequest.5.1",
"Msxml3.XMLHTTP",
"Msxml2.XMLHTTP",
"Msxml2.XMLHTTP.7.0",
"Msxml2.XMLHTTP.6.0",
"Msxml2.XMLHTTP.5.O",
"Msxml2.XMLHTTP.4.O",
"Msxml2.XMLHTTP.3.O",
"Msxml2.XMLHTTP.2.6",
"Msxml2.ServerXMLHTTP",
"Msxml2.ServerXMLHTTP.6.0",
"Msxml2.ServerXMLHTTP.5.0",
"Msxml2.ServerXMLHTTP.4.0",
"Msxml2.ServerXMLHTTP.3.0"
]);
break;
case "CURL":
_interface = SHELL.create();
_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;
};