Merge pull request #105 from voodoodrul/patch-2
Don't use CURLOPT_CUSTOMREQUEST for POSTs
This commit is contained in:
@@ -399,7 +399,11 @@ class Request
|
||||
self::$handle = curl_init();
|
||||
|
||||
if ($method !== Method::GET) {
|
||||
if ($method === Method::POST) {
|
||||
curl_setopt(self::$handle, CURLOPT_POST, true);
|
||||
} else {
|
||||
curl_setopt(self::$handle, CURLOPT_CUSTOMREQUEST, $method);
|
||||
}
|
||||
|
||||
curl_setopt(self::$handle, CURLOPT_POSTFIELDS, $body);
|
||||
} elseif (is_array($body)) {
|
||||
|
||||
Reference in New Issue
Block a user