You are here

protected function SearchApiAcquiaSearchConnectionV3::sendRawGet in Acquia Search for Search API 7.2

Sends a GET request to the Solr server.

Parameters

string $url: The URL to which the request should be sent.

array $options: Additional options for the request, as recognized by drupal_http_request().

Return value

object The HTTP response, as returned by drupal_http_request().

Throws

SearchApiException If an error occurs, either during sending or on the server side.

Overrides SearchApiSolrConnection::sendRawGet

File

includes/v3/SearchApiAcquiaSearchConnectionV3.php, line 30

Class

SearchApiAcquiaSearchConnectionV3
Starting point for the Solr API. Represents a Solr server resource and has methods for pinging, adding, deleting, committing, optimizing and searching.

Code

protected function sendRawGet($url, $options = []) {

  // phpcs:ignore
  $nonce = SearchApiAcquiaCrypt::randomBytes(24);
  $this
    ->prepareRequest($url, $options, $nonce);
  $response = $this
    ->makeHttpRequest($url, $options);
  $response = $this
    ->checkResponse($response);
  return $this
    ->authenticateResponse($response, $nonce, $url);
}