protected function prepareRequestMethod()
{
switch ($this->command->getMethod()) {
case "POST":
$this->options[CURLOPT_POST] = 1;
break;
case "PUT":
$this->options[CURLOPT_CUSTOMREQUEST] = 'PUT';
break;
case "DELETE":
$this->options[CURLOPT_CUSTOMREQUEST] = 'DELETE';
break;
case "HEAD":
$this->options[CURLOPT_NOBODY] = 1;
break;
default:
// reset http method to get in case its changed
$this->options[CURLOPT_HTTPGET] = 1;
}
return $this;
}