Cao Manh Dat commented on SOLR-13683:

This one
Http2SolrClient.Builder().withHttpClient(Http2SolrClient httpClient)
is used for sharing connections pool between multiple {{Http2SolrClient}}s.

The idea here to hiding the underlying {{HttpClient}} (what if we want to 
switch to different client in the future?). More over it help us preventing 
access to {{HttpClient}}. Even in Solr code base right now. Manually modifying 
HttpClient to change {{connectionTimeout}} and {{socketTimeout}} without going 
through provided methods by Http[2]SolrClient is common. This is not good and 
sometime quite confusing for knowing exact params are used by underlying 

Http2SolrClient does not allow configuring custom headers
It does, if you want to set basic auth for a specific request uses 

If you want to set basic auth for all requests sent by {{Http2SolrClient}} uses

If {{PreemptiveBasicAuthClientBuilderFactory}} behaviour is not suitable for 
you, you can always add your own custom headers by using 

> SolrJ 8.1.1 Http2SolrClient should allow customizing HTTP headers
> -----------------------------------------------------------------
>                 Key: SOLR-13683
>                 URL: https://issues.apache.org/jira/browse/SOLR-13683
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: clients - java
>    Affects Versions: 8.1.1
>            Reporter: Niranjan Nanda
>            Priority: Minor
> Currently {{Http2SolrClient}} does not allow configuring custom headers. For 
> example, how to pass Basic Auth headers? It should expose some builder APIs 
> to pass such headers.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to