Skip to content

Commit ffc63d9

Browse files
authored
Add Accept header (#230)
set Accept header to application/json, text/event-stream
1 parent ae96a68 commit ffc63d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

client/transport/streamable_http.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ func (c *StreamableHTTP) SendNotification(ctx context.Context, notification mcp.
356356

357357
// Set headers
358358
req.Header.Set("Content-Type", "application/json")
359+
req.Header.Set("Accept", "application/json, text/event-stream")
359360
if sessionID := c.sessionID.Load(); sessionID != "" {
360361
req.Header.Set(headerKeySessionID, sessionID.(string))
361362
}

0 commit comments

Comments
 (0)