Remove 'Sse' from AspNetCoreSseServer sample name (#665)

This commit is contained in:
Stephen Halter 2025-08-01 10:47:11 -07:00 • committed by GitHub
commit 5e5b1af29b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,13 @@
using System.Text.Json;
namespace ModelContextProtocol;
internal static class HttpClientExt
{
public static async Task<JsonDocument> ReadJsonDocumentAsync(this HttpClient client, string requestUri)
{
using var response = await client.GetAsync(requestUri);
response.EnsureSuccessStatusCode();
return await JsonDocument.ParseAsync(await response.Content.ReadAsStreamAsync());
}
}