protected function AcquiaSearchService::_sendRawPost in Acquia Connector 7.2
Same name and namespace in other branches
- 7.3 acquia_search/Acquia_Search_Service.php \AcquiaSearchService::_sendRawPost()
- 7 acquia_search/Acquia_Search_Service.php \AcquiaSearchService::_sendRawPost()
Central method for making a POST operation against this Solr Server
@override
Overrides DrupalApacheSolrService::_sendRawPost
File
- acquia_search/
Acquia_Search_Service.php, line 112
Class
- AcquiaSearchService
- 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 _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);
}