protected function DrupalApacheSolrService::_sendRawPost in Apache Solr Search 7
Same name and namespace in other branches
- 8 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::_sendRawPost()
- 6.3 Drupal_Apache_Solr_Service.php \DrupalApacheSolrService::_sendRawPost()
Central method for making a POST operation against this Solr Server
2 calls to DrupalApacheSolrService::_sendRawPost()
- DrupalApacheSolrService::search in ./
Drupal_Apache_Solr_Service.php - Simple Search interface
- DrupalApacheSolrService::update in ./
Drupal_Apache_Solr_Service.php - Raw update Method. Takes a raw post body and sends it to the update service. Post body should be a complete and well formed xml document.
File
- ./
Drupal_Apache_Solr_Service.php, line 535
Class
- DrupalApacheSolrService
- 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';
}
$response = $this
->_makeHttpRequest($url, $options);
return $this
->checkResponse($response);
}