From 69134d927c39c9d92714d1767e77539c4d0802c0 Mon Sep 17 00:00:00 2001 From: Rick Anderson Date: Thu, 1 Aug 2019 09:46:54 -0700 Subject: [PATCH] Update http-requests.md (#13603) * Update http-requests.md * Update http-requests.md --- aspnetcore/fundamentals/http-requests.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/aspnetcore/fundamentals/http-requests.md b/aspnetcore/fundamentals/http-requests.md index 1eaf966ea9..747aa02d38 100644 --- a/aspnetcore/fundamentals/http-requests.md +++ b/aspnetcore/fundamentals/http-requests.md @@ -70,7 +70,12 @@ In the preceding code, the request doesn't need to specify a hostname. It can pa ### Typed clients -Typed clients provide the same capabilities as named clients without the need to use strings as keys. The typed client approach provides IntelliSense and compiler help when consuming clients. They provide a single location to configure and interact with a particular `HttpClient`. For example, a single typed client might be used for a single backend endpoint and encapsulate all logic dealing with that endpoint. Another advantage is that they work with DI and can be injected where required in your app. +Typed clients: + +* Provide the same capabilities as named clients without the need to use strings as keys. +* Provides IntelliSense and compiler help when consuming clients. +* Provide a single location to configure and interact with a particular `HttpClient`. For example, a single typed client might be used for a single backend endpoint and encapsulate all logic dealing with that endpoint. +* Work with DI and can be injected where required in your app. A typed client accepts a `HttpClient` parameter in its constructor: @@ -175,7 +180,10 @@ Once registered, can be called, passing in the handler type.