Skip to content

Commit ec2884e

Browse files
speedstorm1copybara-github
authored andcommitted
chore: internal change
PiperOrigin-RevId: 876366282
1 parent c9632f0 commit ec2884e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/com/google/genai/ApiClient.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)