Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[HttpClient] add DecoratorTrait for response#53332
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
83e1005 to7d838a2Comparenicolas-grekas commentedJan 2, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hello, thanks for proposing. Can you explain your use case? |
7d838a2 toc10f850Comparecyve commentedJan 6, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hi@nicolas-grekas, thanks for your feedback. I took the opportunity to take a deeper look at the AsyncResponse concept. It looks really nice. I was able to do almost everything I wanted to do with response wrappers. My last use case is a caching client decorator. Same as the internal I saw that the I don't know if it worth it, but I added a static |
c10f850 to1a41eedCompare
Uh oh!
There was an error while loading.Please reload this page.
When we decorate the HttpClient, we often need to create a dedicated class to wrap the response (ex
TraceableHttpClient=>TraceableResponse)Following the idea introduced in#41161, I propose to add a trait to simplify the response decoration.
Example: