Skip to content

Commit 2fad40f

Browse files
committed
Added support for configuring HttpClientFactory. Needed for Proxy support.
1 parent 4f7020b commit 2fad40f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

FirebaseAdmin/FirebaseAdmin/AppOptions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using System;
1616
using System.Collections.Generic;
1717
using Google.Apis.Auth.OAuth2;
18+
using Google.Apis.Http;
1819

1920
namespace FirebaseAdmin
2021
{
@@ -35,6 +36,7 @@ internal AppOptions(AppOptions options)
3536
this.Credential = options.Credential;
3637
this.ProjectId = options.ProjectId;
3738
this.ServiceAccountId = options.ServiceAccountId;
39+
this.ClientFactory = options.ClientFactory;
3840
}
3941

4042
/// <summary>
@@ -58,5 +60,10 @@ internal AppOptions(AppOptions options)
5860
/// JSON.</para>
5961
/// </summary>
6062
public string ServiceAccountId { get; set; }
63+
64+
/// <summary>
65+
/// Gets or sets the HttpClientFactory to use when making Firebase requirests.
66+
/// </summary>
67+
public HttpClientFactory ClientFactory { get; set; } = new HttpClientFactory();
6168
}
6269
}

FirebaseAdmin/FirebaseAdmin/Messaging/FirebaseMessaging.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public sealed class FirebaseMessaging : IFirebaseService
3030
private FirebaseMessaging(FirebaseApp app)
3131
{
3232
this.messagingClient = new FirebaseMessagingClient(
33-
new HttpClientFactory(), app.Options.Credential, app.GetProjectId());
33+
app.Options.ClientFactory, app.Options.Credential, app.GetProjectId());
3434
}
3535

3636
/// <summary>

0 commit comments

Comments
 (0)