-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Http] Add support for Kiota #2510
Comments
Notes from @nickrandolph
@Kunal22shah we would need to register the HttpClient through the Http Extensions like we do in Refit with the uno.extensions/src/Uno.Extensions.Http.Refit/ServiceCollectionExtensions.cs Lines 59 to 77 in f677bd2
So we'd need to use the registered HttpClient from that extension method and pass that one along to the HttpClientRequestAdapter I believe. Same for the IAuthenticationProvider stuff, this is a bit confusing as both the Auth extensions from Uno and the Kiota packages define a IAuthenticationProvider interface. |
We need to dig deeper and brainstorm exactly what will be the implementation of |
@kazo0 we could register the
and then do something like this for AddClientWithEndpoint : (not sure if we want a custom auth handler for kiota?)
|
I don't recall how much implementation there was in the refit support but it looks like there's quite a bit here that I would have assumed is not required (eg configurehttpclient) if we're picking up the HttpClient from extensions but perhaps this is required for Kiota, which I'm not that familiar with. |
We should be able to do something like this: Where we can add handlers to the IHttpClientBuilder |
@nickrandolph @kazo0 i made changes to add the kiota handler as a part of the same draft PR so its easier to follow |
From what I see as part of the Refit implementation, the Refit extensions are responsible for the HttpClient creation, or at least responsible for providing the Below is a working example of how we could provide the IHttpClientBuilder from the Kiota extensions, through the |
so i followed their approach mentioned here : #2509
|
Description
Creating a new project for Kiota under Http and Serialization for Kiota. Issue : #2459, Draft : #2509
ServiceCollectionExtensions
for Kiota: will facilitate the registration of Kiota clients, similar to how Refit is handled in Uno.Extensions.Usage
appsettings.json
, similar to existing Http extensions.Implement a
KiotaSerializerAdapter
to manage the serialization and deserialization of Kiota-generated modelsUse
HttpClientRequestAdapter
:It will include support for IRequestAdapter and IAuthenticationProvider to handle requests and authentication
The text was updated successfully, but these errors were encountered: