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.
1 parent eb5a74f commit 32d47f3Copy full SHA for 32d47f3
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