Fix resource subscription handling (#89)

* Fix resource subscription handling
Add resource subscription tests

* Fix typo

* Typo

* small fixes

* Fix concurrency issue with test

* Align with specification schemas
This commit is contained in:
Peder Holdgaard Pedersen 2025-03-17 17:54:29 +01:00 • committed by GitHub
commit 34a6f1c665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -227,7 +227,7 @@ public static class McpClientExtensions
{
Throw.IfNull(client);
return client.SendRequestAsync<dynamic>(
return client.SendRequestAsync<EmptyResult>(
CreateRequest("resources/subscribe", new() { ["uri"] = uri }),
cancellationToken);
}
@ -242,7 +242,7 @@ public static class McpClientExtensions
{
Throw.IfNull(client);
return client.SendRequestAsync<dynamic>(
return client.SendRequestAsync<EmptyResult>(
CreateRequest("resources/unsubscribe", new() { ["uri"] = uri }),
cancellationToken);
}