UNPKG

2.69 kBTypeScriptView Raw
1import * as inspectorCommandTypes from './InspectorBackendCommands';
2export declare class Request {
3 private _networkDomainDebugger;
4 private _requestID;
5 private _resourceType;
6 private _data;
7 private _mimeType;
8 constructor(_networkDomainDebugger: NetworkDomainDebugger, _requestID: string);
9 get mimeType(): string;
10 set mimeType(value: string);
11 get requestID(): string;
12 get hasTextContent(): boolean;
13 get data(): any;
14 set data(value: any);
15 get resourceType(): string;
16 set resourceType(value: string);
17 responseReceived(response: inspectorCommandTypes.NetworkDomain.Response): void;
18 loadingFinished(): void;
19 requestWillBeSent(request: inspectorCommandTypes.NetworkDomain.Request): void;
20}
21export declare class NetworkDomainDebugger implements inspectorCommandTypes.NetworkDomain.NetworkDomainDispatcher {
22 private _enabled;
23 events: inspectorCommandTypes.NetworkDomain.NetworkFrontend;
24 constructor();
25 get enabled(): boolean;
26 /**
27 * Enables network tracking, network events will now be delivered to the client.
28 */
29 enable(): void;
30 /**
31 * Disables network tracking, prevents network events from being sent to the client.
32 */
33 disable(): void;
34 /**
35 * Specifies whether to always send extra HTTP headers with the requests from this page.
36 */
37 setExtraHTTPHeaders(params: inspectorCommandTypes.NetworkDomain.SetExtraHTTPHeadersMethodArguments): void;
38 /**
39 * Returns content served for the given request.
40 */
41 getResponseBody(params: inspectorCommandTypes.NetworkDomain.GetResponseBodyMethodArguments): {
42 body: string;
43 base64Encoded: boolean;
44 };
45 /**
46 * Tells whether clearing browser cache is supported.
47 */
48 canClearBrowserCache(): {
49 result: boolean;
50 };
51 /**
52 * Clears browser cache.
53 */
54 clearBrowserCache(): void;
55 /**
56 * Tells whether clearing browser cookies is supported.
57 */
58 canClearBrowserCookies(): {
59 result: boolean;
60 };
61 /**
62 * Clears browser cookies.
63 */
64 clearBrowserCookies(): void;
65 /**
66 * Toggles ignoring cache for each request. If <code>true</code>, cache will not be used.
67 */
68 setCacheDisabled(params: inspectorCommandTypes.NetworkDomain.SetCacheDisabledMethodArguments): void;
69 /**
70 * Loads a resource in the context of a frame on the inspected page without cross origin checks.
71 */
72 loadResource(params: inspectorCommandTypes.NetworkDomain.LoadResourceMethodArguments): {
73 content: string;
74 mimeType: string;
75 status: number;
76 };
77 static idSequence: number;
78 create(): Request;
79}