diff --git a/Belevo_Server_Kommunikation/module.php b/Belevo_Server_Kommunikation/module.php index 5eb88f1..693f468 100644 --- a/Belevo_Server_Kommunikation/module.php +++ b/Belevo_Server_Kommunikation/module.php @@ -132,13 +132,16 @@ return $json; IPS_LogMessage("Belevo_Server_Kommunikation", "InfluxDB-Token fehlt->SendJsonToInfluxDB"); return; }*/ + $headers = [ + "Content-Type: application/json", + //"Authorization: Bearer $token" // Wenn der Token gebraucht wird, füge ihn hier hinzu + ]; + $options = [ 'http' => [ - 'header' => "Content-Type: application/json\r\n". - "daten: $json". - "id: test\r\n", + 'header' => implode("\r\n", $headers), 'method' => 'POST', - + 'content' => $json, // Hier wird das JSON im Body gesendet ], ]; $context = stream_context_create($options); diff --git a/library.json b/library.json index b7c0953..858bcee 100644 --- a/library.json +++ b/library.json @@ -6,7 +6,7 @@ "compatibility": { "version": "7.1" }, - "version": "0.38", + "version": "0.39", "build": 0, "date": 0 } \ No newline at end of file