mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Update http.js
This commit is contained in:
parent
4716a3a39e
commit
840e3bfb4c
52
lib/http.js
52
lib/http.js
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user