Fixed StreamableHttpClientSessionTransport.cs for netstandard (#582)

Fixed exception 'The format of value 'application/json; charset=utf-8' is invalid
This commit is contained in:
Luca 2025-07-02 22:13:13 +02:00 • committed by GitHub
commit cd8e5d5f7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,7 +75,7 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
using var content = new StringContent(
JsonSerializer.Serialize(message, McpJsonUtilities.JsonContext.Default.JsonRpcMessage),
Encoding.UTF8,
"application/json; charset=utf-8"
"application/json"
);
#endif
@ -310,4 +310,4 @@ internal sealed partial class StreamableHttpClientSessionTransport : TransportBa
}
}
}
}
}