Added PUT method using CURLOPT_CUSTOMREQUEST

This commit is contained in:
wilypomegranate
2020-06-14 14:45:42 -04:00
committed by GitHub
parent d636cec8f3
commit 8777fc7561

View File

@@ -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)) {