We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f161d27 + 32d47f3 commit 7b2a488Copy full SHA for 7b2a488
articles/azure-functions/functions-dotnet-dependency-injection.md
@@ -80,6 +80,7 @@ using Microsoft.Azure.WebJobs;
80
using Microsoft.Azure.WebJobs.Extensions.Http;
81
using Microsoft.AspNetCore.Http;
82
using Microsoft.Extensions.Logging;
83
+using System.Net.Http;
84
85
namespace MyNamespace
86
{
@@ -88,10 +89,10 @@ namespace MyNamespace
88
89
private readonly IMyService _service;
90
private readonly HttpClient _client;
91
- public HttpTrigger(IMyService service, IHttpClientFactory httpClientFactory)
92
+ public HttpTrigger(IMyService service, HttpClient httpClient)
93
94
_service = service;
- _client = httpClientFactory.CreateClient();
95
+ _client = httpClient;
96
}
97
98
[FunctionName("GetPosts")]
0 commit comments