File tree Expand file tree Collapse file tree
src/main/java/com/google/genai Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,9 @@ private OkHttpClient createHttpClient(
236236 builder .readTimeout (Duration .ofMillis (0 ));
237237 builder .writeTimeout (Duration .ofMillis (0 ));
238238
239- httpOptions .timeout ().ifPresent (timeout -> builder .callTimeout (Duration .ofMillis (timeout )));
239+ httpOptions
240+ .timeout ()
241+ .ifPresent (timeout -> builder .callTimeout (Duration .ofMillis (timeout )));
240242
241243 HttpRetryOptions retryOptions =
242244 httpOptions .retryOptions ().orElse (HttpRetryOptions .builder ().build ());
@@ -428,7 +430,7 @@ protected Request buildRequest(
428430 }
429431
430432 /** Sets the required headers (including auth) on the request object. */
431- private void setHeaders (Request .Builder request , HttpOptions requestHttpOptions ) {
433+ protected void setHeaders (Request .Builder request , HttpOptions requestHttpOptions ) {
432434 for (Map .Entry <String , String > header :
433435 requestHttpOptions .headers ().orElse (ImmutableMap .of ()).entrySet ()) {
434436 request .header (header .getKey (), header .getValue ());
@@ -728,6 +730,7 @@ public static void setDefaultBaseUrls(
728730 @ Override
729731 public void close () {
730732 try {
733+
731734 httpClient ().dispatcher ().executorService ().shutdown ();
732735 httpClient ().connectionPool ().evictAll ();
733736 if (httpClient ().cache () != null ) {
You can’t perform that action at this time.
0 commit comments