( ctx: DebugSessionApiContext, durationSecs: number, targets: string[], )
| 187 | } |
| 188 | |
| 189 | export 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 | |
| 200 | export async function getDebugSession(ctx: DebugSessionApiContext, sessionId: string): Promise<DebugSession> { |
| 201 | const body = await request<Raw>(ctx, 'GET', `${sessionsPath(ctx)}/${sessionId}`, { timeout: POLL_TIMEOUT_MS }); |
no test coverage detected