public final class OpenCodeOkHttpClientFactory extends Object
OkHttpClient instances used by the OpenCode SDK in standalone mode.
When a Spring container already provides an external OkHttpClient, the injection
constructors should be used instead and this factory will not participate.
OpenCodeHttpClientConfig| Modifier and Type | Method and Description |
|---|---|
static okhttp3.OkHttpClient |
create(OpenCodeHttpClientConfig config)
根据 OpenCode HTTP 配置创建客户端。
|
static void |
shutdown(okhttp3.OkHttpClient client)
释放 SDK 自建客户端资源。
|
public static okhttp3.OkHttpClient create(OpenCodeHttpClientConfig config)
config - 客户端配置;不得为 nullpublic static void shutdown(okhttp3.OkHttpClient client)
client - SDK 自建客户端Copyright © 2026. All rights reserved.