Skip to content

Commit 783f3da

Browse files
committed
Remove OkHttpClient
1 parent 37bf338 commit 783f3da

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<mockserver.version>5.15.0</mockserver.version>
2626
<mutiny-zero.version>1.1.1</mutiny-zero.version>
2727
<quarkus.platform.version>3.22.3</quarkus.platform.version>
28-
<okhttp.version>4.12.0</okhttp.version>
2928
<rest-assured.version>5.5.1</rest-assured.version>
3029
<slf4j.version>2.0.17</slf4j.version>
3130

@@ -63,16 +62,6 @@
6362
<artifactId>jackson-datatype-jsr310</artifactId>
6463
<version>${jackson.version}</version>
6564
</dependency>
66-
<dependency>
67-
<groupId>com.squareup.okhttp3</groupId>
68-
<artifactId>okhttp</artifactId>
69-
<version>${okhttp.version}</version>
70-
</dependency>
71-
<dependency>
72-
<groupId>com.squareup.okhttp3</groupId>
73-
<artifactId>okhttp-sse</artifactId>
74-
<version>${okhttp.version}</version>
75-
</dependency>
7665
<dependency>
7766
<groupId>io.smallrye.reactive</groupId>
7867
<artifactId>mutiny-zero</artifactId>

src/main/java/io/a2a/client/A2AClient.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@
4545
import io.a2a.spec.TaskIdParams;
4646
import io.a2a.spec.TaskPushNotificationConfig;
4747
import 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

src/test/java/io/a2a/client/sse/SSEEventListenerTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import io.a2a.spec.TaskStatus;
2525
import io.a2a.spec.TaskStatusUpdateEvent;
2626
import io.a2a.spec.TextPart;
27-
import org.jetbrains.annotations.NotNull;
2827
import org.junit.jupiter.api.Test;
2928

3029
public class SSEEventListenerTest {
@@ -258,7 +257,7 @@ public Void get() throws InterruptedException, ExecutionException {
258257
}
259258

260259
@Override
261-
public Void get(long timeout, @NotNull TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
260+
public Void get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
262261
return null;
263262
}
264263
}

0 commit comments

Comments
 (0)