You are here

protected function AcquiaSearchSolrService::prepareRequest in Acquia Connector 7.3

Prepares request before send.

Parameters

string $url: Request URL.

array $options: Request options.

string $nonce: Nonce.

Throws

\Exception

3 calls to AcquiaSearchSolrService::prepareRequest()
AcquiaSearchSolrService::makeServletRequest in acquia_search/includes/AcquiaSearchSolrService.php
Make a request to a servlet (a path) that's not a standard path.
AcquiaSearchSolrService::_sendRawGet in acquia_search/includes/AcquiaSearchSolrService.php
Central method for making a GET operation against this Solr Server
AcquiaSearchSolrService::_sendRawPost in acquia_search/includes/AcquiaSearchSolrService.php
Central method for making a POST operation against this Solr Server

File

acquia_search/includes/AcquiaSearchSolrService.php, line 68

Class

AcquiaSearchSolrService
Class AcquiaSearchSolrService.

Code

protected function prepareRequest(&$url, array &$options, $nonce) {
  $url = $this
    ->adjustUrl($url);
  if (!isset($options['headers'])) {
    $options['headers'] = [];
  }
  $string = !empty($options['data']) ? $options['data'] : NULL;
  $options['headers']['Cookie'] = $this
    ->createAuthCookie($url, $nonce, $string);
  $options['headers'] += $this
    ->addUserAgentHeader();
}