forked from SolrNet/SolrNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switch to Singleton AutoSolrConnection * Add override to IServiceCollection.AddSolrNet , allowing to set injection options. Currently only supporting tweaking the HttpClient in use by the AutoSolrConnection. * Add unit test showing the use of Basic Authentication. Fixes SolrNet#402
- Loading branch information
Showing
3 changed files
with
60 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System.Net.Http; | ||
|
||
namespace SolrNet | ||
{ | ||
public class SolrNetOptions | ||
{ | ||
public SolrNetOptions(HttpClient httpClient) | ||
{ | ||
HttpClient = httpClient; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the HttpClient with which SolrNet connects to the Solr server. This is the place to add Default Headers for Basic Authentication for example.. | ||
/// </summary> | ||
public HttpClient HttpClient { get; } | ||
} | ||
} |