question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Replace HttpClientFactory as interface

See original GitHub issue

Hello.

In the GoogleApi repository, an implementation of Google.Apis.Http.IHttpClientFactory using Microsoft.Extensions.Http.IHttpMessageHandlerFactory is presented.

https://github.com/googleapis/google-api-dotnet-client/issues/1756

https://github.com/googleapis/google-api-dotnet-client/blob/bfc9090dc2fae5b06a654328c4da7bc6b05b66f1/Src/Support/IntegrationTests/HttpClientFromMessageHandlerFactoryTests.cs#L38

To apply this method to Firebase as well, change the type of the AppOptions.HttpClientFactory property from Google.Apis.Http.HttpClientFactory to Google.Apis.Http.IHttpClientFactory?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
hiranya911commented, Mar 5, 2021

Fair enough. We can look into making this change in a future release (shouldn’t be a breaking change as far as I can tell).

1reaction
mikequ-taggysoftcommented, Nov 23, 2021

@hiranya911 Any updates on this? We’d really like to use .NET’s IHttpClientFactory to manage the underlying http connections for efficiency. Since this is already supported in other Google APIs, and the pattern is now the universal best-practice for all modern .NET applications, it would be great for the Firebase SDK to support it as well. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use IHttpClientFactory to implement resilient HTTP requests
It's an interface that's used to configure and create HttpClient instances in an ... For more information, see Using HttpClientFactory in .
Read more >
Make HTTP requests using IHttpClientFactory in ASP.NET ...
Learn about using the IHttpClientFactory interface to manage logical HttpClient ... replace those occurrences with calls to CreateClient.
Read more >
Create default HttpClientFactory for integration test
The obvious solution is to inject a HttpClientFactory which now can be used to issue a HttpClient instance every time the typed client...
Read more >
Using HttpClientFactory in ASP.NET Core Applications
The HttpClient class implements the IDisposable interface. By seeing that, we can all be tempted to try using our HttpClient instance inside the ......
Read more >
IHttpClientFactory in ASP.NET Core: a better way to make the ...
IHttpClientFactory is an interface in the System.Net. ... method and CreateClient(HttpClientFactory) extension method to create HttpClient instance.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found