You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Eugen Paraschiv <eu...@odesk.com> on 2013/11/20 21:28:16 UTC

SolrJ - HttpSolrServer - allow setting custom HTTP headers

Hi - a quick question about a low(ish)-level usecase of SolrJ.
I am trying to set a custom HTTP Header on the request that SolrJ is
sending out to the Solr Server - and as far as I can tell - there isn't a
clear way of doing that.
HttpSolrServer.request crates the HttpGet request and sends it - but
doesn't expose it at any point, nor does it allow setting any custom
headers on it.
Since this is a relatively general case - and I am assuming that
non-trivial applications may make use of various custom headers - would it
make sense to add an overloaded request method here?
One very simple option would be to simply pass in a map.
A more general way would be to allow the client to pass in the method
itself (HttpRequestBase method) - especially since the code that creates
the method is very straightforward.
Should I open a JIRA to track this?
Any help is appreciated.
Cheers,
Eugen.