mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update http.js
This commit is contained in:
parent
a20e0004d2
commit
145e22de21
11
lib/http.js
11
lib/http.js
|
@ -604,11 +604,12 @@ var HTTPObject = function(engine) {
|
|||
}
|
||||
|
||||
if (this.isJSONResponse()) {
|
||||
if (typeof(WScript) !== "undefined") {
|
||||
JSON = {};
|
||||
FILE.includeFile("app/assets/js/json2.js");
|
||||
try {
|
||||
this.setResponseBody(JSON.parse(responseText));
|
||||
} catch (e) {
|
||||
console.error("JSON parse error: " + e.message);
|
||||
this.setResponseBody({});
|
||||
}
|
||||
this.setResponseBody(JSON.parse(responseText));
|
||||
} else {
|
||||
this.setResponseBody(responseText);
|
||||
}
|
||||
|
@ -1047,7 +1048,7 @@ exports.parseURL = parseURL;
|
|||
exports.DEFAULT_USER_AGENT = DEFAULT_USER_AGENT;
|
||||
exports.defaultUserAgent = DEFAULT_USER_AGENT; // compatible with the specific case
|
||||
|
||||
exports.VERSIONINFO = "HTTP request module (http.js) version 0.7.18";
|
||||
exports.VERSIONINFO = "HTTP request module (http.js) version 0.7.19";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user