MENU

Fun & Interesting

Middleware Pattern For HttpClient With Delegating Handlers

Milan Jovanović 18,903 2 years ago
Video Not Working? Fix It Now

☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic HttpClient allows you to send HTTP requests to external services. But do you know how to add middleware to an outgoing request? Middleware allows you to add behavior before or after the request. And you can also do that with HttpClient requests using custom message handlers. Find out how in this video. Join my weekly .NET newsletter: https://www.milanjovanovic.tech Read my Blog here: https://www.milanjovanovic.tech/blog Subscribe for more: https://www.youtube.com/@MilanJovanovicTech?sub_confirmation=1 Chapters 0:00 Taking a look at the typed HttpClinet 1:40 Adding authentication headers using DelegatingHandler 6:52 Creating logging middleware with a DelegatingHandler 10:27 Resilient DelegatingHandler with retries using Polly

Comment