export type NetworkAPI = 'fetch' | 'xhr' | 'html';
export interface NetworkEvent {
type: 'network';
api: NetworkAPI;
request: {
url: string;
method?: string;
headers: Record;
body?: string | null;
cookie: string | null;
};
response: {
url: string;
status: number;
headers: Record;
body: string | null;
};
}
export interface InterceptConfig {
/** Capture window.fetch traffic (default true) */
fetch?: boolean;
/** Capture XMLHttpRequest traffic (default true) */
xhr?: boolean;
/** Capture classic HTML