Skip to content

Commit

Permalink
Merge pull request #6 from claygorman/fix-delete-payload
Browse files Browse the repository at this point in the history
Fixing delete payload... causes 500 when empty
  • Loading branch information
maclof authored Apr 17, 2017
2 parents 85a696c + f6ecac1 commit 8f79454
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,13 @@ public function sendRequest($method, $uri, $query = [], $body = [], $namespace =
}

$requestUri = $baseUri . $uri;
$requestOptions = [
'query' => is_array($query) ? $query : [],
'body' => is_array($body) ? json_encode($body) : $body,
];
$requestOptions = [];
if ($method != 'DELETE') {
$requestOptions = [
'query' => is_array($query) ? $query : [],
'body' => is_array($body) ? json_encode($body) : $body,
];
}

if (!$this->isUsingGuzzle6()) {
try {
Expand Down

0 comments on commit 8f79454

Please sign in to comment.