public function SearchApiAcquiaSearchConnection::makeServletRequest in Acquia Search for Search API 7.2
Make a request to a servlet (a path) that's not a standard path.
@override
Overrides SearchApiSolrConnection::makeServletRequest
File
- includes/
v2/ SearchApiAcquiaSearchConnection.php, line 167
Class
- SearchApiAcquiaSearchConnection
- Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.
Code
public function makeServletRequest($servlet, array $params = array(), array $options = array()) {
// Add default params.
$params += array(
'wt' => 'json',
);
$url = $this
->constructUrl($servlet, $params);
// We assume we only authenticate the URL for other servlets.
$nonce = $this
->prepareRequest($url, $options, FALSE);
$response = $this
->makeHttpRequest($url, $options);
$response = $this
->checkResponse($response);
return $this
->authenticateResponse($response, $nonce, $url);
}