You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will receive a HttpClient instance, which might have been decorated with some resilient strategy against transient failure and with some default values. You might even receive a client where the BaseUrl is already set. So, this approach can be particularly useful if you need to hide a REST API client behind a strongly-typed service layer.
3
+
4
+
This solution has 2 projects
5
+
#TypedHttpClient - .Net Class Library
6
+
Contains the typed http client library.
7
+
8
+
#HogwartsAPI - ASP.NET Core Web API
9
+
Contains web api project which makes use of TypedHttpClient library to make http requests. Dependency injection for the TypedHttpClient is performed under Program.cs file.
0 commit comments