mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 13:16:05 +00:00
Update http.js
This commit is contained in:
parent
340794d14c
commit
51da417506
13
lib/http.js
13
lib/http.js
|
@ -86,6 +86,7 @@ var HTTPObject = function(engine) {
|
||||||
this.isLoggingCookie = false;
|
this.isLoggingCookie = false;
|
||||||
this.debuggingText = '';
|
this.debuggingText = '';
|
||||||
|
|
||||||
|
this.curlVersion = "8.12.1_4";
|
||||||
this.curlOptions = [];
|
this.curlOptions = [];
|
||||||
|
|
||||||
this.charset = FILE.CdoCharset.CdoUTF_8;
|
this.charset = FILE.CdoCharset.CdoUTF_8;
|
||||||
|
@ -118,11 +119,11 @@ var HTTPObject = function(engine) {
|
||||||
// the location of cURL binary
|
// the location of cURL binary
|
||||||
var arch = SYS.getArch();
|
var arch = SYS.getArch();
|
||||||
if (arch.toLowerCase().indexOf("arm") > -1) {
|
if (arch.toLowerCase().indexOf("arm") > -1) {
|
||||||
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64a-mingw\\bin\\curl.exe");
|
this.setBinPath("bin\\x64\\curl-" + this.curlVersion + "-win64a-mingw\\bin\\curl.exe");
|
||||||
} else if (arch.indexOf("64") > -1) {
|
} else if (arch.indexOf("64") > -1) {
|
||||||
this.setBinPath("bin\\x64\\curl-8.10.1_1-win64-mingw\\bin\\curl.exe");
|
this.setBinPath("bin\\x64\\curl-" + this.curlVersion + "-win64-mingw\\bin\\curl.exe");
|
||||||
} else {
|
} else {
|
||||||
this.setBinPath("bin\\x86\\curl-8.10.1_1-win32-mingw\\bin\\curl.exe");
|
this.setBinPath("bin\\x86\\curl-" + this.curlVersion + "-win32-mingw\\bin\\curl.exe");
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not clear after calling the `exec`
|
// do not clear after calling the `exec`
|
||||||
|
@ -1131,6 +1132,10 @@ var HTTPObject = function(engine) {
|
||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.setCurlVersion = function(curlVersion) {
|
||||||
|
this.curlVersion = curlVersion;
|
||||||
|
};
|
||||||
|
|
||||||
this.create();
|
this.create();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1215,7 +1220,7 @@ exports.parseURL = parseURL;
|
||||||
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
||||||
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible
|
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible
|
||||||
|
|
||||||
exports.VERSIONINFO = "HTTP REST API client for WelsonJS framework (http.js) version 0.7.45";
|
exports.VERSIONINFO = "WelsonJS framework HTTP client (http.js) version 0.7.46";
|
||||||
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