This is a example on how to properly use HttpClient from a typed client within ASP.NET, taking as reference the excellent PluralSight course 'Accessing APIs Using HttpClient in .NET' by Kevin Dockx over https://app.pluralsight.com/library/courses/dot-net-6-httpclient-using-accessing-apis/table-of-contents.
Check out his GitHub page where the respective source code can be found: https://github.com/KevinDockx/AccessingApisWithHttpClient