Skip to content

Commit cb35876

Browse files
committed
Merge branch 'master' of https://github.com/jasonkneen/RESTe
2 parents a0092c0 + 08c21c6 commit cb35876

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

reste.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ var main = function () {
7878

7979
var formEncode = false;
8080

81-
http.timeout = config.timeout || 10000;
81+
http.timeout = args.timeout || config.timeout || 10000;
8282

8383
if (_.has(config, "validatesSecureCertificate")) {
84-
http.setValidatesSecureCertificate(config.validatesSecureCertificate);
84+
http.validatesSecureCertificate = config.validatesSecureCertificate
8585
}
8686

8787
if (args.url.indexOf("http") >= 0) {
@@ -115,7 +115,7 @@ var main = function () {
115115
}
116116

117117
if (_.has(config, "securityManager")) {
118-
http.setSecurityManager(config.securityManager);
118+
http.securityManager = config.securityManager;
119119
}
120120

121121
http.onload = function (e) {
@@ -295,6 +295,7 @@ var main = function () {
295295
return makeHttpRequest({
296296
url: url,
297297
method: method,
298+
timeout: args.timeout || config.timeout || 10000,
298299
params: body,
299300
headers: args.requestHeaders || args.headers,
300301
beforePost: args.beforePost,
@@ -321,6 +322,7 @@ var main = function () {
321322
return makeHttpRequest({
322323
url: url,
323324
method: method,
325+
timeout: args.timeout || config.timeout || 10000,
324326
params: body,
325327
headers: args.requestHeaders || args.headers,
326328
beforePost: args.beforePost,
@@ -575,4 +577,4 @@ var main = function () {
575577
return reste;
576578
};
577579

578-
module.exports = main;
580+
module.exports = main;

0 commit comments

Comments
 (0)