diff --git a/restclient.php b/restclient.php index 3a69870..27ee19c 100755 --- a/restclient.php +++ b/restclient.php @@ -177,6 +177,9 @@ public function execute($url, $method='GET', $parameters=[], $headers=[]){ $curlopt[CURLOPT_POST] = TRUE; $curlopt[CURLOPT_POSTFIELDS] = $parameters_string; } + else if(strtoupper($method) == 'HEAD'){ + $curlopt[CURLOPT_NOBODY] = TRUE; + } elseif(strtoupper($method) != 'GET'){ $curlopt[CURLOPT_CUSTOMREQUEST] = strtoupper($method); $curlopt[CURLOPT_POSTFIELDS] = $parameters_string;