u/WestDiscGolfin r/dotnet • Recommends
On “consuming api in a proper way”
You should look at using httpclientfactory and httpclient to aid with avoiding issues such as DNS caching and port exhaustion.
This blog post about it could help (disclosure it's mine) - https://adamstorr.azurewebsites.net/blog/simple-example-of-calling-rest-api-with-httpclient-in-net5.0
Nick Chapsas has also done a video recently on the subject - link to this video
Good luck!