protected function AcquiaSearchSolrService::_sendRawPost in Acquia Connector 7.3
Central method for making a POST operation against this Solr Server
Overrides DrupalApacheSolrService::_sendRawPost
File
- acquia_search/
includes/ AcquiaSearchSolrService.php, line 41
Class
- AcquiaSearchSolrService
- Class AcquiaSearchSolrService.
Code
protected function _sendRawPost($url, $options = []) {
// phpcs:ignore
$options['method'] = 'POST';
if (!isset($options['headers']['Content-Type'])) {
$options['headers']['Content-Type'] = 'text/xml; charset=UTF-8';
}
$nonce = AcquiaSearchSolrCrypt::randomBytes(24);
$this
->prepareRequest($url, $options, $nonce);
$response = $this
->_makeHttpRequest($url, $options);
$response = $this
->checkResponse($response);
return $this
->authenticateResponse($response, $nonce, $url);
}