Skip to content

Commit e1acf02

Browse files
kagezhaozhaohuaqiang
authored andcommitted
mcp-client should also include configurable http headers in the /sse request
1 parent a0e968a commit e1acf02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/sse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ func (c *SSEMCPClient) Start(ctx context.Context) error {
9393
req.Header.Set("Accept", "text/event-stream")
9494
req.Header.Set("Cache-Control", "no-cache")
9595
req.Header.Set("Connection", "keep-alive")
96+
for k, v := range c.headers {
97+
req.Header.Set(k, v)
98+
}
9699

97100
resp, err := c.httpClient.Do(req)
98101
if err != nil {

0 commit comments

Comments
 (0)