Skip to content

Commit 8eaa504

Browse files
feat(client/transport): enhance HTTP request flexibility
Enhanced the flexibility of HTTP requests in the streamable HTTP client by allowing additional headers to be specified. This change aims to support more diverse server requirements and improve the adaptability of our client transport layer. Signed-off-by: Matthis Holleville <matthish29@gmail.com>
1 parent 5c850ff commit 8eaa504

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/transport/streamable_http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ func (c *StreamableHTTP) sendResponseToServer(ctx context.Context, response *JSO
752752
ctx, cancel := c.contextAwareOfClientClose(ctx)
753753
defer cancel()
754754

755-
resp, err := c.sendHTTP(ctx, http.MethodPost, bytes.NewReader(responseBody), "application/json, text/event-stream")
755+
resp, err := c.sendHTTP(ctx, http.MethodPost, bytes.NewReader(responseBody), "application/json, text/event-stream", nil)
756756
if err != nil {
757757
c.logger.Errorf("failed to send response to server: %v", err)
758758
return

0 commit comments

Comments
 (0)