UNPKG

756 BTypeScriptView Raw
1import type { HandlerDataFetch } from '@sentry/types';
2/**
3 * Add an instrumentation handler for when a fetch request happens.
4 * The handler function is called once when the request starts and once when it ends,
5 * which can be identified by checking if it has an `endTimestamp`.
6 *
7 * Use at your own risk, this might break without changelog notice, only used internally.
8 * @hidden
9 */
10export declare function addFetchInstrumentationHandler(handler: (data: HandlerDataFetch) => void): void;
11/**
12 * Parses the fetch arguments to find the used Http method and the url of the request.
13 * Exported for tests only.
14 */
15export declare function parseFetchArgs(fetchArgs: unknown[]): {
16 method: string;
17 url: string;
18};
19//# sourceMappingURL=fetch.d.ts.map
\No newline at end of file