Giter VIP home page Giter VIP logo

Comments (4)

sps-campbellwray avatar sps-campbellwray commented on June 27, 2024

Hi @goldsam, could you please provide some more information? This library is built using Flurl which provides a wrapper for HttpClient, and manages the HttpClient lifecycle, etc.

It would be a significant design change to move this project from Flurl to a standard HttpClient, so this issue is likely out of scope, unless Flurl has support to configure it with an existing HttpClient.

from keycloak.net.

goldsam avatar goldsam commented on June 27, 2024

I understand. Why does HttpClient need to be wrapped? this is the platform standard client. Preventing me from injecting my own instance flies in the face of well established conventions - specifically constructor injection.

I see Flurl has an IFlurlClientFactory abstraction. Allowing an instance of this interface to be injected into the client constructor would satisfy my requirements.

from keycloak.net.

sps-campbellwray avatar sps-campbellwray commented on June 27, 2024

Hi @goldsam,

I see that you opened an issue on the Flurl project yesterday asking for some more information about the goals of Flurl. I see it has since been deleted, so hopefully you got a satisfactory answer.

As for why it is used in this project, as you can likely see this project was forked from an earlier project, and we took over maintenance of the fork in mid-2023, so I cannot really speak to why it was originally chosen, as Flurl has been a dependency for this project long before we started maintaining it.

With that said, as with many open-source projects we welcome contributions from the community, so, if you would like to be able to inject an existing HttpClient instance via the Factory interface you identified you are welcome to open a Pull Request. Please keep in mind when implementing this change should be backwards compatible with the existing implementation, i.e. it should be optional to inject an HttpClient and your change should not require users to manage their own HttpClient if they do not want to.

If you do open a PR please let me know so that it doesn't get missed,
Thanks.

from keycloak.net.

goldsam avatar goldsam commented on June 27, 2024

I've found that it was easier to just NSwag to code generate a client from a generated Keycloak OpenAPI spec. This approach is easier to keep up to date and is considerably more flexible. Thanks though.

from keycloak.net.

Related Issues (17)

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.