, Donovan Jimenez */ // require Apache_Solr_HttpTransport_Response require_once(dirname(__FILE__) . '/Response.php'); /** * Interface that all Transport (HTTP Requester) implementations must implement. These * Implementations can then be plugged into the Service instance in order to user their * the desired method for making HTTP requests */ interface Apache_Solr_HttpTransport_Interface { /** * Get the current default timeout for all HTTP requests * * @return float */ public function getDefaultTimeout(); /** * Set the current default timeout for all HTTP requests * * @param float $timeout */ public function setDefaultTimeout($timeout); /** * Set authentication credentials to pass along with the requests. * * These will be used to perform HTTP Basic authentication. * * @param string $username * @param string $password */ public function setAuthenticationCredentials($username, $password); /** * Set proxy. * * These will be used to perform HTTP connection througt proxy. * * @param string $proxy * @param string $port * @param string $username * @param string $password */ public function setProxy($proxy, $port, $username = '', $password = ''); /** * Perform a GET HTTP operation with an optional timeout and return the response * contents, use getLastResponseHeaders to retrieve HTTP headers * * @param string $url * @param float $timeout * @return Apache_Solr_HttpTransport_Response HTTP response */ public function performGetRequest($url, $timeout = false); /** * Perform a HEAD HTTP operation with an optional timeout and return the response * headers - NOTE: head requests have no response body * * @param string $url * @param float $timeout * @return Apache_Solr_HttpTransport_Response HTTP response */ public function performHeadRequest($url, $timeout = false); /** * Perform a POST HTTP operation with an optional timeout and return the response * contents, use getLastResponseHeaders to retrieve HTTP headers * * @param string $url * @param string $rawPost * @param string $contentType * @param float $timeout * @return Apache_Solr_HttpTransport_Response HTTP response */ public function performPostRequest($url, $rawPost, $contentType, $timeout = false); }