You are here

public function AcquiaSearchService::makeServletRequest in Acquia Search 6.3

Make a request to a servlet (a path) that's not a standard path.

@override

Overrides DrupalApacheSolrService::makeServletRequest

File

./Acquia_Search_Service.php, line 76

Class

AcquiaSearchService

Code

public function makeServletRequest($servlet, $params = 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);
}