blob: 2fc4aaf98e06c468a2500cbf7d8676e523cf6327 [file] [log] [blame]
{
"domain": "Network",
"description": "Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.",
"debuggableTypes": ["itml", "page", "service-worker", "web-page"],
"targetTypes": ["itml", "page", "service-worker"],
"types": [
{
"id": "LoaderId",
"type": "string",
"description": "Unique loader identifier."
},
{
"id": "FrameId",
"type": "string",
"description": "Unique frame identifier."
},
{
"id": "RequestId",
"type": "string",
"description": "Unique request identifier."
},
{
"id": "Timestamp",
"type": "number",
"description": "Elapsed seconds since frontend connected."
},
{
"id": "Walltime",
"type": "number",
"description": "Number of seconds since epoch."
},
{
"id": "Headers",
"type": "object",
"description": "Request / response headers as keys / values of JSON object."
},
{
"id": "ResourceTiming",
"type": "object",
"description": "Timing information for the request.",
"properties": [
{ "name": "startTime", "$ref": "Timestamp", "description": "Request is initiated" },
{ "name": "redirectStart", "$ref": "Timestamp", "description": "Started redirect resolution." },
{ "name": "redirectEnd", "$ref": "Timestamp", "description": "Finished redirect resolution." },
{ "name": "fetchStart", "$ref": "Timestamp", "description": "Resource fetching started." },
{ "name": "domainLookupStart", "type": "number", "description": "Started DNS address resolve in milliseconds relative to fetchStart." },
{ "name": "domainLookupEnd", "type": "number", "description": "Finished DNS address resolve in milliseconds relative to fetchStart." },
{ "name": "connectStart", "type": "number", "description": "Started connecting to the remote host in milliseconds relative to fetchStart." },
{ "name": "connectEnd", "type": "number", "description": "Connected to the remote host in milliseconds relative to fetchStart." },
{ "name": "secureConnectionStart", "type": "number", "description": "Started SSL handshake in milliseconds relative to fetchStart." },
{ "name": "requestStart", "type": "number", "description": "Started sending request in milliseconds relative to fetchStart." },
{ "name": "responseStart", "type": "number", "description": "Started receiving response headers in milliseconds relative to fetchStart." },
{ "name": "responseEnd", "type": "number", "description": "Finished receiving response headers in milliseconds relative to fetchStart." }
]
},
{
"id": "Request",
"type": "object",
"description": "HTTP request data.",
"properties": [
{ "name": "url", "type": "string", "description": "Request URL." },
{ "name": "method", "type": "string", "description": "HTTP request method." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP request headers." },
{ "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data." }
]
},
{
"id": "Response",
"type": "object",
"description": "HTTP response data.",
"properties": [
{ "name": "url", "type": "string", "description": "Response URL. This URL can be different from CachedResource.url in case of redirect." },
{ "name": "status", "type": "integer", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." },
{ "name": "mimeType", "type": "string", "description": "Resource mimeType as determined by the browser." },
{ "name": "source", "type": "string", "enum": ["unknown", "network", "memory-cache", "disk-cache", "service-worker", "inspector-override"], "description": "Specifies where the response came from." },
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
{ "name": "timing", "$ref": "ResourceTiming", "optional": true, "description": "Timing information for the given request." },
{ "name": "security", "$ref": "Security.Security", "optional": true, "description": "The security information for the given request." }
]
},
{
"id": "Metrics",
"type": "object",
"description": "Network load metrics.",
"properties": [
{ "name": "protocol", "type": "string", "optional": true, "description": "Network protocol. ALPN Protocol ID Identification Sequence, as per RFC 7301 (for example, http/2, http/1.1, spdy/3.1)" },
{ "name": "priority", "type": "string", "enum": ["low", "medium", "high"], "optional": true, "description": "Network priority." },
{ "name": "connectionIdentifier", "type": "string", "optional": true, "description": "Connection identifier." },
{ "name": "remoteAddress", "type": "string", "optional": true, "description": "Remote IP address." },
{ "name": "requestHeaders", "$ref": "Headers", "optional": true, "description": "Refined HTTP request headers that were actually transmitted over the network." },
{ "name": "requestHeaderBytesSent", "type": "number", "optional": true, "description": "Total HTTP request header bytes sent over the network." },
{ "name": "requestBodyBytesSent", "type": "number", "optional": true, "description": "Total HTTP request body bytes sent over the network." },
{ "name": "responseHeaderBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response header bytes received over the network." },
{ "name": "responseBodyBytesReceived", "type": "number", "optional": true, "description": "Total HTTP response body bytes received over the network." },
{ "name": "responseBodyDecodedSize", "type": "number", "optional": true, "description": "Total decoded response body size in bytes." },
{ "name": "securityConnection", "$ref": "Security.Connection", "optional": true, "description": "Connection information for the completed request." },
{ "name": "isProxyConnection", "type": "boolean", "optional": true, "description": "Whether or not the connection was proxied through a server. If <code>true</code>, the <code>remoteAddress</code> will be for the proxy server, not the server that provided the resource to the proxy server."}
]
},
{
"id": "WebSocketRequest",
"type": "object",
"description": "WebSocket request data.",
"properties": [
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
"id": "WebSocketResponse",
"type": "object",
"description": "WebSocket response data.",
"properties": [
{ "name": "status", "type": "integer", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
"id": "WebSocketFrame",
"type": "object",
"description": "WebSocket frame data.",
"properties": [
{ "name": "opcode", "type": "number", "description": "WebSocket frame opcode." },
{ "name": "mask", "type": "boolean", "description": "WebSocket frame mask." },
{ "name": "payloadData", "type": "string", "description": "WebSocket frame payload data, binary frames (opcode = 2) are base64-encoded." },
{ "name": "payloadLength", "type": "number", "description": "WebSocket frame payload length in bytes." }
]
},
{
"id": "CachedResource",
"type": "object",
"description": "Information about the cached resource.",
"properties": [
{ "name": "url", "type": "string", "description": "Resource URL. This is the url of the original network request." },
{ "name": "type", "$ref": "Page.ResourceType", "description": "Type of this resource." },
{ "name": "response", "$ref": "Response", "optional": true, "description": "Cached response data." },
{ "name": "bodySize", "type": "number", "description": "Cached response body size." },
{ "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." }
]
},
{
"id": "Initiator",
"type": "object",
"description": "Information about the request initiator.",
"properties": [
{ "name": "type", "type": "string", "enum": ["parser", "script", "other"], "description": "Type of this initiator." },
{ "name": "stackTrace", "type": "array", "items": { "$ref": "Console.CallFrame" }, "optional": true, "description": "Initiator JavaScript stack trace, set for Script only." },
{ "name": "url", "type": "string", "optional": true, "description": "Initiator URL, set for Parser type only." },
{ "name": "lineNumber", "type": "number", "optional": true, "description": "Initiator line number, set for Parser type only." },
{ "name": "nodeId", "$ref": "DOM.NodeId", "optional": true, "description": "Set if the load was triggered by a DOM node, in addition to the other initiator information." }
]
},
{
"id": "NetworkStage",
"type": "string",
"description": "Different stages of a network request.",
"enum": ["request", "response"]
},
{
"id": "ResourceErrorType",
"type": "string",
"description": "Different stages of a network request.",
"enum": ["General", "AccessControl", "Cancellation", "Timeout"]
}
],
"commands": [
{
"name": "enable",
"description": "Enables network tracking, network events will now be delivered to the client."
},
{
"name": "disable",
"description": "Disables network tracking, prevents network events from being sent to the client."
},
{
"name": "setExtraHTTPHeaders",
"description": "Specifies whether to always send extra HTTP headers with the requests from this page.",
"targetTypes": ["page"],
"parameters": [
{ "name": "headers", "$ref": "Headers", "description": "Map with extra HTTP headers." }
]
},
{
"name": "getResponseBody",
"description": "Returns content served for the given request.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the network request to get content for." }
],
"returns": [
{ "name": "body", "type": "string", "description": "Response body." },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." }
]
},
{
"name": "setResourceCachingDisabled",
"description": "Toggles whether the resource cache may be used when loading resources in the inspected page. If <code>true</code>, the resource cache will not be used when loading resources.",
"parameters": [
{ "name": "disabled", "type": "boolean", "description": "Whether to prevent usage of the resource cache." }
]
},
{
"name": "loadResource",
"description": "Loads a resource in the context of a frame on the inspected page without cross origin checks.",
"targetTypes": ["page"],
"async": true,
"parameters": [
{ "name": "frameId", "$ref": "FrameId", "description": "Frame to load the resource from." },
{ "name": "url", "type": "string", "description": "URL of the resource to load." }
],
"returns": [
{ "name": "content", "type": "string", "description": "Resource content." },
{ "name": "mimeType", "type": "string", "description": "Resource mimeType." },
{ "name": "status", "type": "integer", "description": "HTTP response status code." }
]
},
{
"name": "getSerializedCertificate",
"description": "Fetches a serialized secure certificate for the given requestId to be displayed via InspectorFrontendHost.showCertificate.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId" }
],
"returns": [
{ "name": "serializedCertificate", "type": "string", "description": "Represents a base64 encoded WebCore::CertificateInfo object." }
]
},
{
"name": "resolveWebSocket",
"description": "Resolves JavaScript WebSocket object for given request id.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier of the WebSocket resource to resolve." },
{ "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }
],
"returns": [
{ "name": "object", "$ref": "Runtime.RemoteObject", "description": "JavaScript object wrapper for given node." }
]
},
{
"name": "setInterceptionEnabled",
"description": "Enable interception of network requests.",
"targetTypes": ["page"],
"parameters": [
{ "name": "enabled", "type": "boolean" }
]
},
{
"name": "addInterception",
"description": "Add an interception.",
"targetTypes": ["page"],
"parameters": [
{ "name": "url", "type": "string", "description": "URL pattern to intercept, intercept everything if not specified or empty" },
{ "name": "stage", "$ref": "NetworkStage", "description": "Stage to intercept." },
{ "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If false, ignores letter casing of `url` parameter." },
{ "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats `url` parameter as a regular expression." }
]
},
{
"name": "removeInterception",
"description": "Remove an interception.",
"targetTypes": ["page"],
"parameters": [
{ "name": "url", "type": "string" },
{ "name": "stage", "$ref": "NetworkStage", "description": "Stage to intercept." },
{ "name": "caseSensitive", "type": "boolean", "optional": true, "description": "If false, ignores letter casing of `url` parameter." },
{ "name": "isRegex", "type": "boolean", "optional": true, "description": "If true, treats `url` parameter as a regular expression." }
]
},
{
"name": "interceptContinue",
"description": "Continue request or response without modifications.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network request or response to continue." },
{ "name": "stage", "$ref": "NetworkStage", "description": "Stage to continue." }
]
},
{
"name": "interceptWithRequest",
"description": "Replace intercepted request with the provided one.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network request or response to continue." },
{ "name": "url", "type": "string", "optional": true,"description": "HTTP request url." },
{ "name": "method", "type": "string", "optional": true,"description": "HTTP request method." },
{ "name": "headers", "$ref": "Headers", "optional": true, "description": "HTTP response headers. Pass through original values if unmodified." },
{ "name": "postData", "type": "string", "optional": true, "description": "HTTP POST request data, base64-encoded." }
]
},
{
"name": "interceptWithResponse",
"description": "Provide response content for an intercepted response.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network response to modify." },
{ "name": "content", "type": "string" },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." },
{ "name": "mimeType", "type": "string", "optional": true, "description": "MIME Type for the data." },
{ "name": "status", "type": "integer", "optional": true, "description": "HTTP response status code. Pass through original values if unmodified." },
{ "name": "statusText", "type": "string", "optional": true, "description": "HTTP response status text. Pass through original values if unmodified." },
{ "name": "headers", "$ref": "Headers", "optional": true, "description": "HTTP response headers. Pass through original values if unmodified." }
]
},
{
"name": "interceptRequestWithResponse",
"description": "Provide response for an intercepted request. Request completely bypasses the network in this case and is immediately fulfilled with the provided data.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network response to modify." },
{ "name": "content", "type": "string" },
{ "name": "base64Encoded", "type": "boolean", "description": "True, if content was sent as base64." },
{ "name": "mimeType", "type": "string", "description": "MIME Type for the data." },
{ "name": "status", "type": "integer", "description": "HTTP response status code." },
{ "name": "statusText", "type": "string", "description": "HTTP response status text." },
{ "name": "headers", "$ref": "Headers", "description": "HTTP response headers." }
]
},
{
"name": "interceptRequestWithError",
"description": "Fail request with given error type.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for the intercepted Network request to fail." },
{ "name": "errorType", "$ref": "ResourceErrorType", "description": "Deliver error reason for the request failure." }
]
}
],
"events": [
{
"name": "requestWillBeSent",
"description": "Fired when page is about to send HTTP request.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
{ "name": "request", "$ref": "Request", "description": "Request data." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "walltime", "$ref": "Walltime" },
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
{ "name": "redirectResponse", "optional": true, "$ref": "Response", "description": "Redirect response data." },
{ "name": "type", "$ref": "Page.ResourceType", "optional": true, "description": "Resource type." },
{ "name": "targetId", "type": "string", "optional": true, "description": "Identifier for the context of where the load originated. In general this is the target identifier. For Workers this will be the workerId." }
]
},
{
"name": "responseReceived",
"description": "Fired when HTTP response is available.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "type", "$ref": "Page.ResourceType", "description": "Resource type." },
{ "name": "response", "$ref": "Response", "description": "Response data." }
]
},
{
"name": "dataReceived",
"description": "Fired when data chunk was received over the network.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "dataLength", "type": "integer", "description": "Data chunk length." },
{ "name": "encodedDataLength", "type": "integer", "description": "Actual bytes received (might be less than dataLength for compressed encodings)." }
]
},
{
"name": "loadingFinished",
"description": "Fired when HTTP request has finished loading.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "sourceMapURL", "type": "string", "optional": true, "description": "URL of source map associated with this resource (if any)." },
{ "name": "metrics", "$ref": "Metrics", "optional": true, "description": "Network metrics." }
]
},
{
"name": "loadingFailed",
"description": "Fired when HTTP request has failed to load.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "errorText", "type": "string", "description": "User friendly error message." },
{ "name": "canceled", "type": "boolean", "optional": true, "description": "True if loading was canceled." }
]
},
{
"name": "requestServedFromMemoryCache",
"description": "Fired when HTTP request has been served from memory cache.",
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "frameId", "$ref": "FrameId", "description": "Frame identifier." },
{ "name": "loaderId", "$ref": "LoaderId", "description": "Loader identifier." },
{ "name": "documentURL", "type": "string", "description": "URL of the document this request is loaded for." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "initiator", "$ref": "Initiator", "description": "Request initiator." },
{ "name": "resource", "$ref": "CachedResource", "description": "Cached resource data." }
]
},
{
"name": "requestIntercepted",
"description": "Fired when HTTP request has been intercepted. The frontend must respond with <code>Network.interceptContinue</code>, <code>Network.interceptWithRequest</code>` or <code>Network.interceptWithResponse</code>` to resolve this request.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for this intercepted network. Corresponds with an earlier <code>Network.requestWillBeSent</code>." },
{ "name": "request", "$ref": "Request", "description": "Original request content that would proceed if this is continued." }
]
},
{
"name": "responseIntercepted",
"description": "Fired when HTTP response has been intercepted. The frontend must response with <code>Network.interceptContinue</code> or <code>Network.interceptWithResponse</code>` to continue this response.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Identifier for this intercepted network. Corresponds with an earlier <code>Network.requestWillBeSent</code>." },
{ "name": "response", "$ref": "Response", "description": "Original response content that would proceed if this is continued." }
]
},
{
"name": "webSocketWillSendHandshakeRequest",
"description": "Fired when WebSocket is about to initiate handshake.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "walltime", "$ref": "Walltime" },
{ "name": "request", "$ref": "WebSocketRequest", "description": "WebSocket request data." }
]
},
{
"name": "webSocketHandshakeResponseReceived",
"description": "Fired when WebSocket handshake response becomes available.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp" },
{ "name": "response", "$ref": "WebSocketResponse", "description": "WebSocket response data." }
]
},
{
"name": "webSocketCreated",
"description": "Fired upon WebSocket creation.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "url", "type": "string", "description": "WebSocket request URL." }
]
},
{
"name": "webSocketClosed",
"description": "Fired when WebSocket is closed.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." }
]
},
{
"name": "webSocketFrameReceived",
"description": "Fired when WebSocket frame is received.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
]
},
{
"name": "webSocketFrameError",
"description": "Fired when WebSocket frame error occurs.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "errorMessage", "type": "string", "description": "WebSocket frame error message." }
]
},
{
"name": "webSocketFrameSent",
"description": "Fired when WebSocket frame is sent.",
"targetTypes": ["page"],
"parameters": [
{ "name": "requestId", "$ref": "RequestId", "description": "Request identifier." },
{ "name": "timestamp", "$ref": "Timestamp", "description": "Timestamp." },
{ "name": "response", "$ref": "WebSocketFrame", "description": "WebSocket response data." }
]
}
]
}