You are here

protected function AcquiaSearchService::_sendRawPost in Acquia Connector 7.3

Same name and namespace in other branches
  1. 7 acquia_search/Acquia_Search_Service.php \AcquiaSearchService::_sendRawPost()
  2. 7.2 acquia_search/Acquia_Search_Service.php \AcquiaSearchService::_sendRawPost()

Central method for making a POST operation against this Solr Server

Overrides DrupalApacheSolrService::_sendRawPost

File

acquia_search/Acquia_Search_Service.php, line 104

Class

AcquiaSearchService
Starting point for the Solr API.

Code

protected function _sendRawPost($url, $options = array()) {
  $options['method'] = 'POST';

  // Normally we use POST to send XML documents.
  if (!isset($options['headers']['Content-Type'])) {
    $options['headers']['Content-Type'] = 'text/xml; charset=UTF-8';
  }
  $nonce = $this
    ->prepareRequest($url, $options);
  $response = $this
    ->_makeHttpRequest($url, $options);
  $response = $this
    ->checkResponse($response);
  return $this
    ->authenticateResponse($response, $nonce, $url);
}