fix(client): preserve custom Accept headers in StreamableHTTPClientTransport (#1655)
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com> Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
parent
866c08d364
commit
1eb31236e7
1 changed files with 106 additions and 2 deletions
7
.changeset/odd-forks-enjoy.md
Normal file
7
.changeset/odd-forks-enjoy.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
"@modelcontextprotocol/client": patch
|
||||
---
|
||||
|
||||
fix(client): append custom Accept headers to spec-required defaults in StreamableHTTPClientTransport
|
||||
|
||||
Custom Accept headers provided via `requestInit.headers` are now appended to the spec-mandated Accept types instead of being overwritten. This ensures the required media types (`application/json, text/event-stream` for POST; `text/event-stream` for GET SSE) are always present while allowing users to include additional types for proxy/gateway routing.
|
||||
Loading…
Reference in a new issue