public function AcquiaSearchSolrService::makeServletRequest in Acquia Connector 7.3
Make a request to a servlet (a path) that's not a standard path.
@thows Exception
Parameters
string $servlet: A path to be added to the base Solr path. e.g. 'extract/tika'
array $params: Any request parameters when constructing the URL.
array $options: @see drupal_http_request() $options.
Return value
response object
Overrides DrupalApacheSolrService::makeServletRequest
File
- acquia_search/
includes/ AcquiaSearchSolrService.php, line 11
Class
- AcquiaSearchSolrService
- Class AcquiaSearchSolrService.
Code
public function makeServletRequest($servlet, $params = [], $options = []) {
$params += [
'wt' => 'json',
];
$nonce = AcquiaSearchSolrCrypt::randomBytes(24);
$url = $this
->_constructUrl($servlet, $params);
$this
->prepareRequest($url, $options, $nonce);
$response = $this
->_makeHttpRequest($url, $options);
$response = $this
->checkResponse($response);
return $this
->authenticateResponse($response, $nonce, $url);
}