4545import io .a2a .spec .TaskIdParams ;
4646import io .a2a .spec .TaskPushNotificationConfig ;
4747import io .a2a .spec .TaskQueryParams ;
48- import okhttp3 .MediaType ;
49- import okhttp3 .OkHttpClient ;
5048
5149/**
5250 * An A2A client.
@@ -58,8 +56,6 @@ public class A2AClient {
5856 private static final TypeReference <CancelTaskResponse > CANCEL_TASK_RESPONSE_REFERENCE = new TypeReference <>() {};
5957 private static final TypeReference <GetTaskPushNotificationConfigResponse > GET_TASK_PUSH_NOTIFICATION_CONFIG_RESPONSE_REFERENCE = new TypeReference <>() {};
6058 private static final TypeReference <SetTaskPushNotificationConfigResponse > SET_TASK_PUSH_NOTIFICATION_CONFIG_RESPONSE_REFERENCE = new TypeReference <>() {};
61- private static final MediaType JSON_MEDIA_TYPE = MediaType .parse ("application/json; charset=utf-8" );
62- private final OkHttpClient okHttpClient ;
6359 private final A2AHttpClient httpClient ;
6460 private final String agentUrl ;
6561 private AgentCard agentCard ;
@@ -74,7 +70,6 @@ public A2AClient(AgentCard agentCard) {
7470 checkNotNullParam ("agentCard" , agentCard );
7571 this .agentCard = agentCard ;
7672 this .agentUrl = agentCard .url ();
77- this .okHttpClient = new OkHttpClient ();
7873 this .httpClient = new JdkA2AHttpClient ();
7974 }
8075
@@ -86,7 +81,6 @@ public A2AClient(AgentCard agentCard) {
8681 public A2AClient (String agentUrl ) {
8782 checkNotNullParam ("agentUrl" , agentUrl );
8883 this .agentUrl = agentUrl ;
89- this .okHttpClient = new OkHttpClient ();
9084 this .httpClient = new JdkA2AHttpClient ();
9185 }
9286
0 commit comments