Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Add body to curl DELETE request if one is specified. The header will …
Browse files Browse the repository at this point in the history
  • Loading branch information
lucian303 authored and Ocramius committed Jul 27, 2014
1 parent 2aef442 commit 87d54cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Client/Adapter/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ public function write($method, $uri, $httpVersion = 1.1, $headers = array(), $bo
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body);
} elseif ($method == 'PATCH') {
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body);
} elseif ($method == 'DELETE' && $body) {
// DELETE requests can also have a body
curl_setopt($this->curl, CURLOPT_POSTFIELDS, $body);
}

// set additional curl options
Expand Down

0 comments on commit 87d54cc

Please sign in to comment.