-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set specific HttpClient to use #1385
Comments
If you're using DI to register the Binance clients ( services.AddHttpClient<IBinanceRestClient, BinanceRestClient>(options =>
{
options.Timeout = restOptions.RequestTimeout;
}) If you're not using DI you can pass an http client in the BinanceRestClient constructor: var client = new BinanceRestClient(httpClientInstance, loggerFactory, options =>{}); |
Is a different HttpClient used for each request if none is set? |
A single HttpClient is used per client. So if you're re-using the same client the same HttpClient is used, but if you're constructing clients each time then a new HttpClient is used each time |
I am currently trying to read bulk data from BinanceApi into a DB, but cant modify the default httpclient as i assume it would interfere with other libraries using the default client.
Is it possible to set a specific httpclient(factory) to use?
The text was updated successfully, but these errors were encountered: