fix rest platform headers not working

headers were of type str, but requests.get expects a dict.
This deserializes the headers argument from str to dict (via json).
This commit is contained in:
Guillaume Taquet Gasperini 2020-04-02 13:08:13 +02:00
parent 170daf1b81
commit 28614a0504

View File

@ -59,6 +59,8 @@ class Platform:
def __init__(self, *args, **kwargs):
# parse the user's options from the config entries
for key, value in kwargs.items():
if key == "headers":
value = json.loads(value)
self.__dict__[key] = value
# set defaults for omitted options