protected function SearchApiAcquiaSearchConnection::sendRawPost in Acquia Search for Search API 7.2
Central method for making a POST operation against this Solr Server
@override
Overrides SearchApiSolrConnection::sendRawPost
File
- includes/
v2/ SearchApiAcquiaSearchConnection.php, line 198
Class
- SearchApiAcquiaSearchConnection
- 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, array $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);
}