Initial Code commit

This commit is contained in:
nisch.codes 2025-07-21 22:07:04 +02:00
parent e016b9de22
commit f8d737c528
2 changed files with 1 additions and 4 deletions

View File

@ -50,9 +50,6 @@
"Content-Type: application/json", "Content-Type: application/json",
"OCS-APIRequest: true" "OCS-APIRequest: true"
]); ]);
// convert data to json
$respData = json_decode($response, true);
//print_r($respData); //print_r($respData);

View File

@ -40,6 +40,6 @@ class HTTP {
static function fetchJSON(string $url, ?Array $headers = [], ?bool $associative = true): Mixed { static function fetchJSON(string $url, ?Array $headers = [], ?bool $associative = true): Mixed {
// converts the response of fetch into an JSON array/object // converts the response of fetch into an JSON array/object
return json_decode(fetch($url, $headers), $associative); return json_decode(self::fetch($url, $headers), $associative);
} }
} }