From cb25910198f7400f7479edd4d1f1dec8c2a37de9 Mon Sep 17 00:00:00 2001 From: Mark Kim <103070941+marckong@users.noreply.github.com> Date: Fri, 28 Jun 2024 10:32:11 -0400 Subject: [PATCH] chore: add request id (#7610) --- packages/insomnia/src/ui/insomniaFetch.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/insomnia/src/ui/insomniaFetch.ts b/packages/insomnia/src/ui/insomniaFetch.ts index d2d976cad..b86acedb2 100644 --- a/packages/insomnia/src/ui/insomniaFetch.ts +++ b/packages/insomnia/src/ui/insomniaFetch.ts @@ -1,5 +1,6 @@ import { getApiBaseURL, getClientString, INSOMNIA_FETCH_TIME_OUT, PLAYWRIGHT } from '../common/constants'; +import { generateId } from '../common/misc'; interface FetchConfig { method: 'POST' | 'PUT' | 'GET' | 'DELETE' | 'PATCH'; @@ -19,6 +20,7 @@ export async function insomniaFetch({ method, path, data, sessionId, o headers: { ...headers, 'X-Insomnia-Client': getClientString(), + 'insomnia-request-id': generateId('desk'), 'X-Origin': origin || getApiBaseURL(), ...(sessionId ? { 'X-Session-Id': sessionId } : {}), ...(data ? { 'Content-Type': 'application/json' } : {}),