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 43d3b25 commit 1316636Copy full SHA for 1316636
WebPush/WebPushClient.cs
@@ -17,15 +17,24 @@ public class WebPushClient
17
18
private string _gcmApiKey;
19
private HttpClient _httpClient;
20
+ private readonly HttpClientHandler _httpClientHandler;
21
private VapidDetails _vapidDetails;
22
23
+ public WebPushClient(HttpClientHandler httpClientHandler=null)
24
+ {
25
+ _httpClientHandler = httpClientHandler;
26
+ }
27
+
28
protected HttpClient HttpClient
29
{
30
get
31
32
if (_httpClient == null)
33
- _httpClient = new HttpClient();
34
+ _httpClient = _httpClientHandler == null
35
+ ? new HttpClient()
36
+ : new HttpClient(_httpClientHandler);
37
38
}
39
40
return _httpClient;
0 commit comments