Commit 17249c3
Alberto Farah
fix(streamable_http): allow Content-Type header override
Allow StreamableHTTPTransport and streamable_http_client to accept a
custom content_type parameter instead of hardcoding 'application/json'.
This enables clients to override the Content-Type header to include
custom charsets (e.g. 'application/json; charset=utf-8') or other
attributes required by specific server implementations.
Fixes: #23751 parent b33c811 commit 17249c3
File tree
2 files changed
+46
-3
lines changed- src/mcp/client
- tests/client
2 files changed
+46
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
| 85 | + | |
82 | 86 | | |
83 | 87 | | |
84 | 88 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | | - | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
| 522 | + | |
518 | 523 | | |
519 | 524 | | |
520 | 525 | | |
| |||
524 | 529 | | |
525 | 530 | | |
526 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
527 | 535 | | |
528 | 536 | | |
529 | 537 | | |
| |||
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
547 | | - | |
| 555 | + | |
548 | 556 | | |
549 | 557 | | |
550 | 558 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments