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");
|
IPS_LogMessage("Belevo_Server_Kommunikation", "InfluxDB-Token fehlt->SendJsonToInfluxDB");
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
|
$headers = [
|
||||||
|
"Content-Type: application/json",
|
||||||
|
//"Authorization: Bearer $token" // Wenn der Token gebraucht wird, füge ihn hier hinzu
|
||||||
|
];
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
'http' => [
|
'http' => [
|
||||||
'header' => "Content-Type: application/json\r\n".
|
'header' => implode("\r\n", $headers),
|
||||||
"daten: $json".
|
|
||||||
"id: test\r\n",
|
|
||||||
'method' => 'POST',
|
'method' => 'POST',
|
||||||
|
'content' => $json, // Hier wird das JSON im Body gesendet
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$context = stream_context_create($options);
|
$context = stream_context_create($options);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"compatibility": {
|
"compatibility": {
|
||||||
"version": "7.1"
|
"version": "7.1"
|
||||||
},
|
},
|
||||||
"version": "0.38",
|
"version": "0.39",
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"date": 0
|
"date": 0
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user