Skip to content

Commit c3e7f9e

Browse files
ChenKangQiangchenkangqiang
andauthored
fix: client sse (#177)
fix client send stream message without set text/event-stream. # Description Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Follow the [`CONTRIBUTING` Guide](../CONTRIBUTING.md). - [ ] Make your Pull Request title in the <https://www.conventionalcommits.org/> specification. - Important Prefixes for [release-please](https://github.com/googleapis/release-please): - `fix:` which represents bug fixes, and correlates to a [SemVer](https://semver.org/) patch. - `feat:` represents a new feature, and correlates to a SemVer minor. - `feat!:`, or `fix!:`, `refactor!:`, etc., which represent a breaking change (indicated by the `!`) and will result in a SemVer major. - [ ] Ensure the tests pass - [ ] Appropriate READMEs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕 --------- Co-authored-by: chenkangqiang <[email protected]>
1 parent d121d5c commit c3e7f9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/main/java/io/a2a/http/JdkA2AHttpClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public CompletableFuture<Void> getAsyncSSE(
141141
Consumer<String> messageConsumer,
142142
Consumer<Throwable> errorConsumer,
143143
Runnable completeRunnable) throws IOException, InterruptedException {
144-
HttpRequest request = createRequestBuilder(false)
144+
HttpRequest request = createRequestBuilder(true)
145145
.build();
146146
return super.asyncRequest(request, messageConsumer, errorConsumer, completeRunnable);
147147
}
@@ -180,7 +180,7 @@ public CompletableFuture<Void> postAsyncSSE(
180180
Consumer<String> messageConsumer,
181181
Consumer<Throwable> errorConsumer,
182182
Runnable completeRunnable) throws IOException, InterruptedException {
183-
HttpRequest request = createRequestBuilder(false)
183+
HttpRequest request = createRequestBuilder(true)
184184
.build();
185185
return super.asyncRequest(request, messageConsumer, errorConsumer, completeRunnable);
186186
}

0 commit comments

Comments
 (0)