UNPKG

843 BTypeScriptView Raw
1import { Event, Response, Session, TransportOptions } from '@sentry/types';
2import { BaseTransport } from './base';
3declare type FetchImpl = typeof fetch;
4/** `fetch` based transport */
5export declare class FetchTransport extends BaseTransport {
6 /**
7 * Fetch API reference which always points to native browser implementation.
8 */
9 private _fetch;
10 constructor(options: TransportOptions, fetchImpl?: FetchImpl);
11 /**
12 * @inheritDoc
13 */
14 sendEvent(event: Event): PromiseLike<Response>;
15 /**
16 * @inheritDoc
17 */
18 sendSession(session: Session): PromiseLike<Response>;
19 /**
20 * @param sentryRequest Prepared SentryRequest to be delivered
21 * @param originalPayload Original payload used to create SentryRequest
22 */
23 private _sendRequest;
24}
25export {};
26//# sourceMappingURL=fetch.d.ts.map
\No newline at end of file