Added PUT method using CURLOPT_CUSTOMREQUEST
This commit is contained in:
parent
d636cec8f3
commit
8777fc7561
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue