Skip to content

Commit 72e204d

Browse files
committed
Adding fixes for more compatibility.
- Adding forwarding for rejectUnauthorized and secureProtocol tls options.
1 parent 497032e commit 72e204d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

foam.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ module.exports = function soap (uri, operation, action, message, options, callba
2424
callback(err);
2525
}
2626
});
27+
28+
var hyperoptions = {headers: headers(action,xml.length)};
29+
if(options.rejectUnauthorized !== undefined){
30+
hyperoptions.rejectUnauthorized = options.rejectUnauthorized;
31+
}
32+
if(options.secureProtocol !== undefined){
33+
hyperoptions.secureProtocol = options.secureProtocol;
34+
}
2735

28-
var req = hyperquest.post(uri, { headers: headers(action, xml.length)});
36+
var req = hyperquest.post(uri, hyperoptions);
2937
req.on('error', callback);
3038
req.on('response', function (res) {
3139
if (isGzipped(res))

0 commit comments

Comments
 (0)