Skip to content

Commit cf9163d

Browse files
committed
feat: Add GraphServiceClient constructor overload to pass custom OkHttp client
1 parent 2107e18 commit cf9163d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/microsoft/graph/serviceclient/GraphServiceClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public GraphServiceClient(@Nonnull OkHttpClient client) {
7575
public GraphServiceClient(@Nonnull TokenCredential tokenCredential, @Nullable String... scopes) {
7676
this(new AzureIdentityAuthenticationProvider(tokenCredential, new String[] {}, scopes));
7777
}
78+
79+
public GraphServiceClient(@Nonnull OkHttpClient client, @Nonnull TokenCredential tokenCredential, @Nullable String... scopes) {
80+
this(new AzureIdentityAuthenticationProvider(tokenCredential, new String[] {}, scopes), client);
81+
}
7882
/**
7983
* Sets the RequestAdapter for the GraphServiceClient.
8084
* @param requestAdapter the request adapter to use to execute the requests.

0 commit comments

Comments
 (0)