Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change http to https #8

Merged
merged 1 commit into from
Jun 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nodes/forecast/weatherflow-forecast.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function (RED) {
var http = require('http');
var https = require('https');

function WeatherFlowNode(config) {
RED.nodes.createNode(this, config);
Expand Down Expand Up @@ -57,7 +57,7 @@ module.exports = function (RED) {
}

try {
http
https
.request(options, callback)
.on("error", (e) => {
done('problem with request: ${e.message}');
Expand Down
4 changes: 2 additions & 2 deletions nodes/observations-device/observations-device.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { stat } = require('fs');

module.exports = function (RED) {
var http = require('http');
var https = require('https');

function WeatherFlowNode(config) {
RED.nodes.createNode(this, config);
Expand Down Expand Up @@ -55,7 +55,7 @@ module.exports = function (RED) {
}

try {
http
https
.request(options, callback)
.on("error", (e) => {
done('problem with request: ${e.message}');
Expand Down
4 changes: 2 additions & 2 deletions nodes/observations-station/observations-station.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { stat } = require('fs');

module.exports = function (RED) {
var http = require('http');
var https = require('https');

function WeatherFlowNode(config) {
RED.nodes.createNode(this, config);
Expand Down Expand Up @@ -47,7 +47,7 @@ module.exports = function (RED) {
}

try {
http
https
.request(options, callback)
.on("error", (e) => {
done('problem with request: ${e.message}');
Expand Down
8 changes: 3 additions & 5 deletions nodes/stations/weatherflow-stations.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function (RED) {
var http = require('http');
var https = require('https');

function WeatherFlowNode(config) {
RED.nodes.createNode(this, config);
Expand All @@ -8,8 +8,6 @@ module.exports = function (RED) {
node.client = RED.nodes.getNode(config.client);

node.on('input', function (msg, send, done) {
var input = this;

var options = {
host: 'swd.weatherflow.com',
path: '/swd/rest/stations?token=' + node.client.token
Expand All @@ -33,15 +31,15 @@ module.exports = function (RED) {
done(msg);
}
} catch (error) {
done(error);
done(error + '(' + str + ')');
}

});
}

try {

http
https
.request(options, callback)
.on("error", (e) => {
done('problem with request: ${e.message}');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-weatherflow-api-client",
"version": "1.2.3",
"version": "1.2.4",
"author": "Michael Rohrhirsch (https://github.com/CrunkA3)",
"description": "A WeahterFlow Tempest API client for Node-RED",
"repository": {
Expand Down