Skip to main content

Function: setInspectMode()

setInspectMode(enabled): void

Defined in: client.ts:92

Set inspect mode for RPC operations. When enabled, the preprocessed batch request is captured in a global variable while still executing normally.

Parameters​

enabled​

boolean

Whether to enable inspect mode

Returns​

void

Example​

import { setInspectMode, getLastBatchRequest } from '@lumenize/rpc';

setInspectMode(true);
await client.someMethod();
const batchRequest = getLastBatchRequest();
setInspectMode(false);
console.log(batchRequest?.batch[0].operations);