diff --git a/wa-system/file/waNet.class.php b/wa-system/file/waNet.class.php index 470fdb81d..a68d546a4 100644 --- a/wa-system/file/waNet.class.php +++ b/wa-system/file/waNet.class.php @@ -32,6 +32,7 @@ class waNet const METHOD_GET = 'GET'; const METHOD_POST = 'POST'; + const METHOD_PATCH = 'PATCH'; const METHOD_PUT = 'PUT'; const METHOD_DELETE = 'DELETE'; @@ -725,14 +726,9 @@ private function getCurl($url, $content, $method, $curl_options = array()) $curl_options[CURLOPT_POSTFIELDS] = $content; } break; - case self::METHOD_PUT: - $curl_options[CURLOPT_CUSTOMREQUEST] = $method; - if ($content) { - $curl_options[CURLOPT_POST] = 0; - $curl_options[CURLOPT_POSTFIELDS] = $content; - } - break; case self::METHOD_DELETE: + case self::METHOD_PATCH: + case self::METHOD_PUT: $curl_options[CURLOPT_CUSTOMREQUEST] = $method; if ($content) { $curl_options[CURLOPT_POST] = 0;