Skip to content

Commit cd8e5d5

Browse files
authored
Fixed StreamableHttpClientSessionTransport.cs for netstandard (#582)
Fixed exception 'The format of value 'application/json; charset=utf-8' is invalid
1 parent 4411f1c commit cd8e5d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ModelContextProtocol.Core/Client/StreamableHttpClientSessionTransport.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ internal async Task<HttpResponseMessage> SendHttpRequestAsync(JsonRpcMessage mes
7575
using var content = new StringContent(
7676
JsonSerializer.Serialize(message, McpJsonUtilities.JsonContext.Default.JsonRpcMessage),
7777
Encoding.UTF8,
78-
"application/json; charset=utf-8"
78+
"application/json"
7979
);
8080
#endif
8181

@@ -310,4 +310,4 @@ internal static void CopyAdditionalHeaders(
310310
}
311311
}
312312
}
313-
}
313+
}

0 commit comments

Comments
 (0)