diff --git a/src/Unirest/Request.php b/src/Unirest/Request.php index 14275df..cc1836c 100755 --- a/src/Unirest/Request.php +++ b/src/Unirest/Request.php @@ -399,7 +399,11 @@ class Request self::$handle = curl_init(); if ($method !== Method::GET) { - curl_setopt(self::$handle, CURLOPT_CUSTOMREQUEST, $method); + 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)) {