We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0159c06 commit c76a33dCopy full SHA for c76a33d
tulip_machine_attribute.js
@@ -3,6 +3,11 @@ module.exports = function (RED) {
3
4
const request = require('request');
5
const https = require('https');
6
+ const http = require('http');
7
+ const httpLibs = {
8
+ http,
9
+ https
10
+ }
11
const { v4: uuidv4 } = require('uuid');
12
13
// Tulip API node
@@ -15,7 +20,7 @@ module.exports = function (RED) {
15
20
this.deviceInfo = JSON.parse(config.deviceInfo);
16
21
this.payloadSource = config.payloadSource;
17
22
this.payloadType = config.payloadType;
18
- this.agent = new https.Agent({
23
+ this.agent = new httpLibs[apiAuthNode.protocol].Agent({
19
24
keepAlive: config.keepAlive,
25
keepAliveMsecs: config.keepAliveMsecs,
26
});
0 commit comments