Skip to content
Snippets Groups Projects
Unverified Commit d3769bb4 authored by Kirsten Roschanski's avatar Kirsten Roschanski Committed by GitHub
Browse files

Update PrivacyIDEA.php (#38)

Add PUT and DELETE
parent 34fad57f
No related branches found
No related tags found
No related merge requests found
...@@ -400,6 +400,16 @@ class PrivacyIDEA ...@@ -400,6 +400,16 @@ class PrivacyIDEA
curl_setopt($curlInstance, CURLOPT_POST, true); curl_setopt($curlInstance, CURLOPT_POST, true);
curl_setopt($curlInstance, CURLOPT_POSTFIELDS, $params); 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") elseif ($httpMethod === "GET")
{ {
$paramsStr = '?'; $paramsStr = '?';
...@@ -480,4 +490,4 @@ class PrivacyIDEA ...@@ -480,4 +490,4 @@ class PrivacyIDEA
$this->logger->piError("privacyIDEA-PHP-Client: " . $message); $this->logger->piError("privacyIDEA-PHP-Client: " . $message);
} }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment