HTTP/1.1 400 BAD REQUEST Fehler womöglich behoben
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"compatibility": {
|
||||
"version": "7.1"
|
||||
},
|
||||
"version": "0.38",
|
||||
"version": "0.39",
|
||||
"build": 0,
|
||||
"date": 0
|
||||
}
|
||||
Reference in New Issue
Block a user