UNPKG

965 BTypeScriptView Raw
1export type HttpStatusCodeRange = [number, number] | number;
2export type HttpRequestTarget = string | RegExp;
3interface HttpClientOptions {
4 /**
5 * HTTP status codes that should be considered failed.
6 * This array can contain tuples of `[begin, end]` (both inclusive),
7 * single status codes, or a combinations of both
8 *
9 * Example: [[500, 505], 507]
10 * Default: [[500, 599]]
11 */
12 failedRequestStatusCodes: HttpStatusCodeRange[];
13 /**
14 * Targets to track for failed requests.
15 * This array can contain strings or regular expressions.
16 *
17 * Example: ['http://localhost', /api\/.*\/]
18 * Default: [/.*\/]
19 */
20 failedRequestTargets: HttpRequestTarget[];
21}
22/**
23 * Create events for failed client side HTTP requests.
24 */
25export declare const httpClientIntegration: (options?: Partial<HttpClientOptions> | undefined) => import("@sentry/core").Integration;
26export {};
27//# sourceMappingURL=httpclient.d.ts.map
\No newline at end of file