Update http.js

This commit is contained in:
Namhyeon Go 2024-08-21 23:38:48 +09:00 committed by GitHub
parent f3f2cc482c
commit 81a31c7b1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,18 +99,23 @@ var HTTPObject = function(engine) {
]);
} else if (this.engine == "CURL") {
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") {
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") {
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;
};
this.setBinPath = function(binPath) {
console.info(this.engine, " is use ", binPath);
this._interface.setPrefix(binPath);
};
this.jqEnabled = function() {
return (typeof(window) !== "undefined" && typeof(window.jQuery) !== "undefined");
};
@ -1091,7 +1096,7 @@ exports.parseURL = parseURL;
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
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.global = global;
exports.require = global.require;