diff --git a/src/PrivacyIDEA.php b/src/PrivacyIDEA.php index 1a36f21..1215fa3 100644 --- a/src/PrivacyIDEA.php +++ b/src/PrivacyIDEA.php @@ -400,6 +400,16 @@ public function sendRequest(array $params, array $headers, $httpMethod, $endpoin curl_setopt($curlInstance, CURLOPT_POST, true); curl_setopt($curlInstance, CURLOPT_POSTFIELDS, $params); } + elseif ($httpMethod === "PUT") + { + curl_setopt($curlInstance, CURLOPT_CUSTOMREQUEST, "PUT"); + curl_setopt($curlInstance, CURLOPT_POSTFIELDS, $params); + } + elseif ($httpMethod === "DELETE") + { + curl_setopt($curlInstance, CURLOPT_CUSTOMREQUEST, "DELETE"); + curl_setopt($curlInstance, CURLOPT_POSTFIELDS, $params); + } elseif ($httpMethod === "GET") { $paramsStr = '?'; @@ -480,4 +490,4 @@ function errorLog($message) $this->logger->piError("privacyIDEA-PHP-Client: " . $message); } } -} \ No newline at end of file +}