Skip to content

Commit

Permalink
feat: adds create method for options
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Oct 11, 2024
1 parent 507049d commit f8617cc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ private KiotaClientFactory() {}
return create(createDefaultInterceptors());
}

/**
* Creates an OkHttpClient Builder with the default configuration and middleware options.
* @param requestOptions The request options to use for the interceptors.
* @return an OkHttpClient Builder instance.
*/
@Nonnull public static OkHttpClient.Builder create(@Nonnull final RequestOption[] requestOptions) {
Objects.requireNonNull(requestOptions, "parameter requestOptions cannot be null");
return create(createDefaultInterceptors(Arrays.asList(requestOptions)));
}

/**
* Creates an OkHttpClient Builder with the default configuration and middleware.
* @param interceptors The interceptors to add to the client. Will default to createDefaultInterceptors() if null.
Expand Down

0 comments on commit f8617cc

Please sign in to comment.