Add Prereqs section to IHttpClientFactory doc (#7780)

Fixes https://github.com/aspnet/Docs/issues/7762
pull/7784/head
Scott Addie 2018-07-24 08:42:51 -05:00 committed by GitHub
parent b85b92fd84
commit 9babf7b228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,7 @@ description: Learn about using the IHttpClientFactory interface to manage logica
monikerRange: '>= aspnetcore-2.1'
ms.author: scaddie
ms.custom: mvc
ms.date: 06/22/2018
ms.date: 07/23/2018
uid: fundamentals/http-requests
---
# Initiate HTTP requests
@ -19,6 +19,10 @@ An [IHttpClientFactory](/dotnet/api/system.net.http.ihttpclientfactory) can be r
* Manages the pooling and lifetime of underlying `HttpClientMessageHandler` instances to avoid common DNS problems that occur when manually managing `HttpClient` lifetimes.
* Adds a configurable logging experience (via `ILogger`) for all requests sent through clients created by the factory.
## Prerequisites
Projects targeting .NET Framework require installation of the [Microsoft.Extensions.Http](https://www.nuget.org/packages/Microsoft.Extensions.Http/) NuGet package. Projects that target .NET Core and reference the [Microsoft.AspNetCore.App metapackage](xref:fundamentals/metapackage-app) already include the `Microsoft.Extensions.Http` package.
## Consumption patterns
There are several ways `IHttpClientFactory` can be used in an app: