diff --git a/src/Client.php b/src/Client.php index d3bd0ba..6f556c2 100644 --- a/src/Client.php +++ b/src/Client.php @@ -214,7 +214,7 @@ public function apiCall($method, $path, $params, $additional_headers = []) $headers = []; if (in_array($method, ["POST", "PUT", "PATCH"], true)) { ksort($params); - $body = json_encode($params); + $body = empty($params) ? "{}" : json_encode($params); $params = []; $headers["Content-Type"] = "application/json"; $uri = $path;