From 0a885ffea3fa3fde9eca47190b414e9243e1eff9 Mon Sep 17 00:00:00 2001 From: Justin Zimmerman Date: Mon, 28 Mar 2016 17:09:17 -0400 Subject: [PATCH] Support for DELETE requests in the Curl client implementation. --- src/Jira/Api/Client/CurlClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Jira/Api/Client/CurlClient.php b/src/Jira/Api/Client/CurlClient.php index 4668ed9..6f0feb3 100644 --- a/src/Jira/Api/Client/CurlClient.php +++ b/src/Jira/Api/Client/CurlClient.php @@ -94,8 +94,8 @@ public function sendRequest( } else { curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); } - } elseif ($method == 'PUT') { - curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT'); + } elseif ($method == 'PUT' || $method == 'DELETE') { + curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method); curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data)); }