forked from ulixee/unblocked
-
Notifications
You must be signed in to change notification settings - Fork 0
/
IHttpResourceLoadDetails.ts
54 lines (53 loc) · 1.63 KB
/
IHttpResourceLoadDetails.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { Readable } from 'stream';
import { URL } from 'url';
import type { IEventSubscriber } from '@ulixee/commons/interfaces/IRegisteredEventListener';
import IResourceType from './IResourceType';
import IHttpHeaders from './IHttpHeaders';
import OriginType from './OriginType';
export default interface IHttpResourceLoadDetails {
id: number;
isSSL: boolean;
isUpgrade: boolean;
isServerHttp2: boolean;
isHttp2Push: boolean;
remoteAddress?: string;
localAddress?: string;
originType?: OriginType;
hasUserGesture?: boolean;
documentUrl?: string;
isUserNavigation?: boolean;
isFromRedirect?: boolean;
previousUrl?: string;
firstRedirectingUrl?: string; // track back to first redirection
redirectedToUrl?: string;
protocol: string;
dnsResolvedIp?: string;
url: URL;
method: string;
requestTime: number;
requestOriginalHeaders: IHttpHeaders;
requestHeaders: IHttpHeaders;
requestTrailers?: IHttpHeaders;
requestPostData?: Buffer;
requestPostDataStream?: Readable;
status?: number;
originalStatus?: number;
statusMessage?: string;
responseUrl?: string;
responseOriginalHeaders?: IHttpHeaders;
responseHeaders?: IHttpHeaders;
responseTime?: number;
responseTrailers?: IHttpHeaders;
resourceType?: IResourceType;
responseBodySize?: number;
responseBodyStream?: Readable;
browserRequestId?: string;
browserFrameId?: number;
browserHasRequested?: Promise<void>;
browserServedFromCache?: 'service-worker' | 'disk' | 'prefetch' | 'memory';
browserLoadedTime?: number;
browserLoadFailure?: string;
browserBlockedReason?: string;
browserCanceled?: boolean;
events: IEventSubscriber;
}