diff --git a/public/index.php b/public/index.php index 5b19a9b..c022c3b 100644 --- a/public/index.php +++ b/public/index.php @@ -50,9 +50,6 @@ "Content-Type: application/json", "OCS-APIRequest: true" ]); - - // convert data to json - $respData = json_decode($response, true); //print_r($respData); diff --git a/src/HTTP.php b/src/HTTP.php index b9ef10d..32c29b8 100644 --- a/src/HTTP.php +++ b/src/HTTP.php @@ -40,6 +40,6 @@ class HTTP { static function fetchJSON(string $url, ?Array $headers = [], ?bool $associative = true): Mixed { // 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); } } \ No newline at end of file