curl_setopt($this->_curl, CURLOPT_POSTFIELDS,
$body);
} elseif ($method == Zend_Http_Client::DELETE
) { // This is a DELETE by a setRawData string
curl_setopt($this->_curl, CURLOPT_POSTFIELDS,
$body);
} // set additional curl options
if (isset($this->_config
['curloptions'
])) { foreach ((array)$this->_config
['curloptions'
] as $k =>
$v) { if (!
in_array($k,
$this->_invalidOverwritableCurlOptions
)) { if (curl_setopt($this->_curl,
$k,
$v) == false
) { throw new Zend_Http_Client_Exception(sprintf("Unknown or erroreous cURL option '%s' set",
$k));
} } } } // send the request
$response =
curl_exec($this->_curl
);
// if we used streaming, headers are already there
if(!
is_resource($this->out_stream
)) { $this->_response =
$response;
}