Skip to content

Commit f6ecac1

Browse files
committed
Fixing delete payload... causes 500 when empty
1 parent 85a696c commit f6ecac1

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Client.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,13 @@ public function sendRequest($method, $uri, $query = [], $body = [], $namespace =
260260
}
261261

262262
$requestUri = $baseUri . $uri;
263-
$requestOptions = [
264-
'query' => is_array($query) ? $query : [],
265-
'body' => is_array($body) ? json_encode($body) : $body,
266-
];
263+
$requestOptions = [];
264+
if ($method != 'DELETE') {
265+
$requestOptions = [
266+
'query' => is_array($query) ? $query : [],
267+
'body' => is_array($body) ? json_encode($body) : $body,
268+
];
269+
}
267270

268271
if (!$this->isUsingGuzzle6()) {
269272
try {

0 commit comments

Comments
 (0)