mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update http.js
This commit is contained in:
parent
f3f2cc482c
commit
81a31c7b1f
13
lib/http.js
13
lib/http.js
|
@ -99,18 +99,23 @@ var HTTPObject = function(engine) {
|
||||||
]);
|
]);
|
||||||
} else if (this.engine == "CURL") {
|
} else if (this.engine == "CURL") {
|
||||||
this._interface = SHELL.create();
|
this._interface = SHELL.create();
|
||||||
this._interface.setPrefix("bin\\curl.exe"); // the location of cURL binary
|
this.setBinPath("bin\\curl.exe"); // the location of cURL binary
|
||||||
} else if (this.engine == "BITS") {
|
} else if (this.engine == "BITS") {
|
||||||
this._interface = SHELL.create();
|
this._interface = SHELL.create();
|
||||||
this._interface.setPrefix("bitsadmin.exe"); // the location of BITS binary
|
this.setBinPath("bitsadmin.exe"); // the location of BITS binary
|
||||||
} else if (this.engine == "CERT") {
|
} else if (this.engine == "CERT") {
|
||||||
this._interface = SHELL.create();
|
this._interface = SHELL.create();
|
||||||
this._interface.setPrefix("certutil.exe"); // the location of Certutil binary
|
this.setBinPath("certutil.exe"); // the location of Certutil binary
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setBinPath = function(binPath) {
|
||||||
|
console.info(this.engine, " is use ", binPath);
|
||||||
|
this._interface.setPrefix(binPath);
|
||||||
|
};
|
||||||
|
|
||||||
this.jqEnabled = function() {
|
this.jqEnabled = function() {
|
||||||
return (typeof(window) !== "undefined" && typeof(window.jQuery) !== "undefined");
|
return (typeof(window) !== "undefined" && typeof(window.jQuery) !== "undefined");
|
||||||
};
|
};
|
||||||
|
@ -1091,7 +1096,7 @@ exports.parseURL = parseURL;
|
||||||
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
||||||
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible with the specific case
|
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible with the specific case
|
||||||
|
|
||||||
exports.VERSIONINFO = "HTTP client module (http.js) version 0.7.24";
|
exports.VERSIONINFO = "HTTP client module (http.js) version 0.7.25";
|
||||||
exports.AUTHOR = "abuse@catswords.net";
|
exports.AUTHOR = "abuse@catswords.net";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user