weitere syntaxfehler ...

This commit is contained in:
belevo\mh
2024-11-05 11:09:33 +01:00
parent b5b9d6c1a1
commit c8046d6186
2 changed files with 4 additions and 4 deletions

View File

@@ -117,7 +117,7 @@ $influxData = array(
);
// Array in JSON konvertieren
$json = json_encode($data);
$json = json_encode($influxData);
// JSON zurückgeben oder weiterverarbeiten
return $json;
@@ -136,8 +136,8 @@ private function SendJsonToInfluxDB($url, $jsonData) {
CURLOPT_POST => true, // POST-Methode verwenden
CURLOPT_HTTPHEADER => [
'Content-Type: application/json', // Header für JSON-Daten setzen
'Accept: application/json'
'id : test'
'Accept: application/json',
'id: test'
],
CURLOPT_POSTFIELDS => $jsonData // JSON-Daten als POST-Feld senden
]);