From 7d80c843939b87e9fc61654b3638a0cdae8047fc Mon Sep 17 00:00:00 2001 From: David Zingg Date: Wed, 1 Jul 2020 21:25:06 +0200 Subject: [PATCH] #24 API Token Support --- .idea/workspace.xml | 17 ++++++++--------- octoprint_mystromswitch/__init__.py | 1 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 435ccdd..25eb23f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,6 @@ - diff --git a/octoprint_mystromswitch/__init__.py b/octoprint_mystromswitch/__init__.py index 153d484..61844fc 100644 --- a/octoprint_mystromswitch/__init__.py +++ b/octoprint_mystromswitch/__init__.py @@ -180,6 +180,7 @@ class MyStromSwitchPlugin(octoprint.plugin.SettingsPlugin, headers = {} if self.token is not None and self.token != "": headers = {"Token": self.token} + self._logger.info(headers) request = requests.get( 'http://{}/report'.format(self.ip), headers=headers, timeout=1) if request.status_code == 200: