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
16
lib/http.js
16
lib/http.js
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user