You are here

public function SearchApiSolrConnection::makeServletRequest in Search API Solr 7

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

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: Options to be passed to drupal_http_request().

Return value

object The HTTP response object.

Throws

SearchApiException

Overrides SearchApiSolrConnectionInterface::makeServletRequest

File

includes/solr_connection.inc, line 555

Class

SearchApiSolrConnection
Represents a Solr server resource.

Code

public function makeServletRequest($servlet, array $params = array(), array $options = array()) {

  // Add default params.
  $params += array(
    'wt' => 'json',
    'json.nl' => self::NAMED_LIST_FORMAT,
  );
  $url = $this
    ->constructUrl($servlet, $params);
  $response = $this
    ->makeHttpRequest($url, $options);
  return $this
    ->checkResponse($response);
}