MCPcopy Create free account
hub / github.com/Kong/insomnia / createDebugSession

Function createDebugSession

packages/insomnia/src/konnect/debug-session-api.ts:189–198  ·  view source on GitHub ↗
(
  ctx: DebugSessionApiContext,
  durationSecs: number,
  targets: string[],
)

Source from the content-addressed store, hash-verified

187}
188
189export async function createDebugSession(
190 ctx: DebugSessionApiContext,
191 durationSecs: number,
192 targets: string[],
193): Promise<DebugSession> {
194 const body = await request<Raw>(ctx, 'POST', sessionsPath(ctx), {
195 data: { name: 'Insomnia debugger', duration_secs: durationSecs, targets, capture_traces: true },
196 });
197 return normalizeSession(body);
198}
199
200export async function getDebugSession(ctx: DebugSessionApiContext, sessionId: string): Promise<DebugSession> {
201 const body = await request<Raw>(ctx, 'GET', `${sessionsPath(ctx)}/${sessionId}`, { timeout: POLL_TIMEOUT_MS });

Callers 2

startOrAdoptDebugSessionFunction · 0.90

Calls 2

sessionsPathFunction · 0.85
normalizeSessionFunction · 0.85

Tested by

no test coverage detected