MCPcopy Create free account
hub / github.com/ShipSecAI/studio / fetchWithHeaders

Function fetchWithHeaders

frontend/src/store/webhookStore.ts:65–77  ·  view source on GitHub ↗
(url: string, options: RequestInit = {})

Source from the content-addressed store, hash-verified

63});
64
65async function fetchWithHeaders(url: string, options: RequestInit = {}): Promise<Response> {
66 const { getApiAuthHeaders } = await import('@/services/api');
67 const headers = await getApiAuthHeaders();
68
69 return fetch(url, {
70 ...options,
71 headers: {
72 ...headers,
73 'Content-Type': 'application/json',
74 ...options.headers,
75 },
76 });
77}
78
79export const useWebhookStore = create<WebhookStore>((set, get) => ({
80 ...createInitialState(),

Callers 1

webhookStore.tsFile · 0.85

Calls 2

getApiAuthHeadersFunction · 0.85
fetchFunction · 0.85

Tested by

no test coverage detected