Subscribe sends a "resources/subscribe" request to the server, asking for notifications when the specified resource changes.
(ctx context.Context, params *SubscribeParams)
| 1025 | // Subscribe sends a "resources/subscribe" request to the server, asking for |
| 1026 | // notifications when the specified resource changes. |
| 1027 | func (cs *ClientSession) Subscribe(ctx context.Context, params *SubscribeParams) error { |
| 1028 | _, err := handleSend[*emptyResult](ctx, methodSubscribe, newClientRequest(cs, orZero[Params](params))) |
| 1029 | return err |
| 1030 | } |
| 1031 | |
| 1032 | // Unsubscribe sends a "resources/unsubscribe" request to the server, cancelling |
| 1033 | // a previous subscription. |