Content-Length: 260579 | pFad | https://github.com/mark3labs/mcp-go/commit/ffc63d90b0cb05ee26ced8880c329dadad4c202b

2D Add Accept header (#230) · mark3labs/mcp-go@ffc63d9 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/mark3labs/mcp-go/commit/ffc63d90b0cb05ee26ced8880c329dadad4c202b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy