mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
chore: add request id (#7610)
This commit is contained in:
parent
eab0e9c675
commit
cb25910198
@ -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<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' } : {}),
|
||||
|
Loading…
Reference in New Issue
Block a user