Giter Club home page Giter Club logo

Comments (5)

andrei-m-code avatar andrei-m-code commented on May 27, 2024 1

@Dreamescaper @VictorK1902 In v3.0.0 injecting HttpClient is mandatory. There are a few cases when some manipulations with http client are needed, like here #27. So to avoid it all together we now have it in constructor parameters. It also eliminates the need of IDisposable interface implementation. Makes it cleaner.

Thanks for your feedback.

from net-core-push-notifications.

VictorK1902 avatar VictorK1902 commented on May 27, 2024

I looked into the Send logic and saw that too. Eventually I ended up making a few minor changes, including this, and use that instead. The whole library is fairly straightforward as well so I manually installed the dependencies and extracting pieces that I need.

from net-core-push-notifications.

andrei-m-code avatar andrei-m-code commented on May 27, 2024

@Dreamescaper @VictorK1902 I understand that it is recommended to use HttpClientFactory and I'd gladly add it to the library. My only concern is it will make the library a bit harder to use. Some people wouldn't know how to deal with HttpClientFactory. I'll consider adding it in the future version however using the factory is not that critical anymore. Please see this blogpost https://www.stevejgordon.co.uk/httpclient-connection-pooling-in-dotnet-core.

Anyways, thanks for this great feedback!

from net-core-push-notifications.

Dreamescaper avatar Dreamescaper commented on May 27, 2024

My suggestion is not to use HttpClientFactory directly, but having HttpClient parameter in constructor (maybe as non-required parameter or as separate constructor to preserve backward compatibility).

Still, thanks for info about HttpClient, didn't know that.

from net-core-push-notifications.

Dreamescaper avatar Dreamescaper commented on May 27, 2024

Another reason for doing that - I'd like to be able to add custom HttpMessageHandler to be able to log requests/responses.

from net-core-push-notifications.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.