Skip to content

Commit

Permalink
chore: add request id (#7610)
Browse files Browse the repository at this point in the history
  • Loading branch information
marckong authored Jun 28, 2024
1 parent eab0e9c commit cb25910
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/insomnia/src/ui/insomniaFetch.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -19,6 +20,7 @@ export async function insomniaFetch<T = void>({ 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' } : {}),
Expand Down

0 comments on commit cb25910

Please sign in to comment.