protected function setMethod($method)
    {
        switch (strtoupper($method)) {
            case 'HEAD':
                curl_setopt($this->request, CURLOPT_NOBODY, true);
                break;
            case 'GET':
                curl_setopt($this->request, CURLOPT_HTTPGET, true);
                break;
            case 'POST':
                curl_setopt($this->request, CURLOPT_POST, true);
                break;
            default:
                curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
        }
    }
protected function setMethod($method)
    {
        switch (strtoupper($method)) {
            case 'HEAD':
                curl_setopt($this->request, CURLOPT_NOBODY, true);
                break;
            case 'GET':
                curl_setopt($this->request, CURLOPT_HTTPGET, true);
                break;
            case 'POST':
                curl_setopt($this->request, CURLOPT_POST, true);
                break;
            default:
                curl_setopt($this->request, CURLOPT_CUSTOMREQUEST, $method);
        }
    }
protected function setMethod ( $ method ) { switch ( strtoupper ( $ method ) ) { case 'HEAD' : curl_setopt ( $ this -> request , CURLOPT_NOBODY , true ) ; break ; case 'GET' : curl_setopt ( $ this -> request , CURLOPT_HTTPGET , true ) ; break ; case 'POST' : curl_setopt ( $ this -> request , CURLOPT_POST , true ) ; break ; default : curl_setopt ( $ this -> request , CURLOPT_CUSTOMREQUEST , $ method ) ; } }
Sets desired HTTP method
@param $method
Sets desired HTTP method