execute

View as MarkdownOpen in Claude
1execute<T>(request, options?): Promise<T>

Executes a raw JSON-RPC request on the client session.

Lower-level than executeMethod — allows full control over the RPC request structure.

Type Parameters

Type ParameterDefault type
T extends JSONRPCResponseJSONRPCResponse

Parameters

request
JSONRPCRequestRequired

Complete JSON-RPC request object. See JSONRPCRequest.

options
PendingRPCOptions

Optional RPC execution options (timeout, etc.). See PendingRPCOptions.

Returns

Promise<T>

The RPC response.

Throws

If the RPC call returns an error response.

Examples

Send a raw JSON-RPC request

1const response = await call.execute({
2 jsonrpc: '2.0',
3 id: crypto.randomUUID(),
4 method: 'call.mute',
5 params: { call_id: call.id },
6});

See

  • executeMethod — higher-level wrapper for member-targeted Verto methods.