From 8777fc75619413df446b4a21ed23fd079f28baaa Mon Sep 17 00:00:00 2001 From: wilypomegranate Date: Sun, 14 Jun 2020 14:45:42 -0400 Subject: [PATCH] Added PUT method using CURLOPT_CUSTOMREQUEST --- app/Core/Http/Client.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Core/Http/Client.php b/app/Core/Http/Client.php index cc6c5b20d..b45a01d45 100644 --- a/app/Core/Http/Client.php +++ b/app/Core/Http/Client.php @@ -241,6 +241,10 @@ class Client extends Base if ('POST' === $method) { curl_setopt($curlSession, CURLOPT_POST, true); curl_setopt($curlSession, CURLOPT_POSTFIELDS, $content); + } elseif ('PUT' === $method) { + curl_setopt($curlSession, CURLOPT_CUSTOMREQUEST, 'PUT'); + curl_setopt($curlSession, CURLOPT_POST, true); + curl_setopt($curlSession, CURLOPT_POSTFIELDS, $content); } if (! empty($headers)) {