Skip to content

Commit 8222e18

Browse files
authored
fix: resolve the server 406 error in API calls (#203)
1 parent 5b52641 commit 8222e18

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

crates/rmcp/src/transport/common/reqwest/streamable_http_client.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ impl StreamableHttpClient for reqwest::Client {
8888
) -> Result<StreamableHttpPostResponse, StreamableHttpError<Self::Error>> {
8989
let mut request = self
9090
.post(uri.as_ref())
91-
.header(ACCEPT, EVENT_STREAM_MIME_TYPE)
92-
.header(ACCEPT, JSON_MIME_TYPE);
91+
.header(ACCEPT, [EVENT_STREAM_MIME_TYPE, JSON_MIME_TYPE].join(", "));
9392
if let Some(auth_header) = auth_token {
9493
request = request.bearer_auth(auth_header);
9594
}

0 commit comments

Comments
 (0)