From 01997dc246fd2d3fb7c5f256657fe4753a88ea91 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 4254297..ce7ee83 100644 --- a/src/Jira/Api/Client/CurlClient.php +++ b/src/Jira/Api/Client/CurlClient.php @@ -117,8 +117,8 @@ public function sendRequest( 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)); }