From 73c10d9bd0d27a5ff5473bef4ae04ecddb6d53b2 Mon Sep 17 00:00:00 2001 From: Alexkurd <7689609+Alexkurd@users.noreply.github.com> Date: Wed, 19 May 2021 14:34:35 +0300 Subject: [PATCH 1/2] Add METHOD_PATCH --- wa-system/file/waNet.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wa-system/file/waNet.class.php b/wa-system/file/waNet.class.php index 470fdb81d..7411eb459 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'; From 733e44f2ec4e5793ff205ffa9288a0edbd3d5b43 Mon Sep 17 00:00:00 2001 From: Alexkurd <7689609+Alexkurd@users.noreply.github.com> Date: Wed, 19 May 2021 15:28:19 +0300 Subject: [PATCH 2/2] Update waNet.class.php --- wa-system/file/waNet.class.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/wa-system/file/waNet.class.php b/wa-system/file/waNet.class.php index 7411eb459..a68d546a4 100644 --- a/wa-system/file/waNet.class.php +++ b/wa-system/file/waNet.class.php @@ -726,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;