public function SolrConnectorPluginBase::serverRestPost in Search API Solr 8.3
Same name and namespace in other branches
- 8 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::serverRestPost()
- 8.2 src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::serverRestPost()
- 4.x src/SolrConnector/SolrConnectorPluginBase.php \Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase::serverRestPost()
Sends a REST POST request to the Solr server and returns the result.
Parameters
string $path: The path to append to the base URI.
string $command_json: The command to send encoded as JSON.
Return value
string The decoded response.
Throws
\Drupal\search_api_solr\SearchApiSolrException
Overrides SolrConnectorInterface::serverRestPost
File
- src/
SolrConnector/ SolrConnectorPluginBase.php, line 649
Class
- SolrConnectorPluginBase
- Defines a base class for Solr connector plugins.
Namespace
Drupal\search_api_solr\SolrConnectorCode
public function serverRestPost($path, $command_json = '') {
$this
->useTimeout(self::INDEX_TIMEOUT);
return $this
->restRequest($path, Request::METHOD_POST, $command_json);
}