Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Commit

Permalink
[bugfix] (PHPLIB-103) Remove POST payload on Delete and Get requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Gabriel committed Jan 31, 2019
1 parent 1e6a7d5 commit 56602fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Adapter/CurlAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function init($url, $payload = null, $httpMethod = HttpAdapterInterface::
$this->setOption(CURLOPT_SSL_VERIFYHOST, 2);
$this->setOption(CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2

if (HttpAdapterInterface::REQUEST_GET !== $httpMethod) {
if (in_array($httpMethod, [HttpAdapterInterface::REQUEST_POST, HttpAdapterInterface::REQUEST_PUT], true)) {
$this->setOption(CURLOPT_POSTFIELDS, $payload);
}
}
Expand Down

0 comments on commit 56602fa

Please sign in to comment.