go to bug id or search bugs for
On our java solr servers, we use a custom HTTP header (with a value of the user id) as a part of a key for caching requests, and send that in HTTP requests.
(If the requesting user id is the same as a cache entry, and the query params are the same, the cached result is returned. )
We currently do this via a patched version of this extension, but was wondering if this would be useful elsewhere.
// $params is SolrParams or subclass
$params->setHTTPHeader(string $key, string $value) for SolrParams and all subclasses.
(Throwing an exception if $key is reserved)
$params->addHTTPHeader(string $key, string $value)
(Alternately, add it as a possible optional field, called like $client->query($params, ['request_headers' => ['custom_header' => 'value', 'custom_header2' => ['value1', 'value2']]])
If this is useful to others, I should be able to put together a patch.
Add a Patch
Add a Pull Request