Comments (2)
I'm curious to see if this impacts all languages today honestly. Thoughts @baywet?
Also, what if we were skipping entirely the KiotaClientFactory.Create(handler)
and accepting the handlers
in the HttpClientRequestAdapter
?
The result would be :
var handlers = KiotaClientFactory.CreateDefaultHandlers();
handlers.Insert(0, new CompressionHandler());
var requestAdapter = new HttpClientRequestAdapter(new AnonymousAuthenticationProvider(), handlers);
This seems to be a much more useful way to do it and would hide a lot of the complexity. We would still support the full HttpClient
way, but this would serve more advanced scenarios.
from kiota-http-dotnet.
passing the handlers independently of the client is going to lead to overloads overload IMHO. The client may carry additional information the user wants to set besides the handlers.
As for the other languages:
- TypeScript passes the handlers directly, but that's because it doesn't have a client object
- Java is just create the order doesn't matter
- Same for Go
- Ruby doesn't have middleware yet
- Python doesn't require ordering
- PHP doesn't require people to order themselves, but uses a stack which maintains order
from kiota-http-dotnet.
Related Issues (20)
- Configurable defaults for `ObservabilityOptions` in http middleware HOT 4
- System.Text.Json dependency constraint for .NET 8 scenarios HOT 2
- How do I react to unexpected status codes? HOT 1
- KiotaClientFactory doesn't build a httpclient that will work because it is missing auth middleware HOT 2
- Activity source memory leak HOT 1
- ApiException should return mapped error response if it parses successfully HOT 2
- map XXX error status code
- Is there any way to get response body when status code is unsuccessful? HOT 5
- ensure 3XX responses without location header do not throw
- RetryHandler should add more information on failures HOT 1
- Package should be using a license expression HOT 2
- Leverage Framework dependencies rather than explicit where possible HOT 2
- Kiota HttpAdapter does not support Http/2 HOT 1
- Suggestion: KiotaClientFactory should allow for setting handler options HOT 7
- Microsoft.Graph.Models.ODataErrors.ODataError: Signature generation failed on client with:Cannot access a disposed object. HOT 3
- Defaulting to HTTP/2.0 breaks consumers using .NET Framework HOT 9
- SocketsHttpHandler as final handler HOT 7
- ConfigureAwait(false) calls missing
- UriReplacementHandler issues
- RetryHandler should throw an APIException with retry error nested in the innerException.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kiota-http-dotnet.