|
| 1 | +# Partial support for Network domain of ChromeDevTools Protocol. |
| 2 | +# https://github.com/ChromeDevTools/devtools-protocol/blob/master/pdl/domains/Network.pdl |
| 3 | + |
| 4 | +experimental domain Network |
| 5 | + depends on Runtime |
| 6 | + |
| 7 | + # Resource type as it was perceived by the rendering engine. |
| 8 | + type ResourceType extends string |
| 9 | + enum |
| 10 | + Document |
| 11 | + Stylesheet |
| 12 | + Image |
| 13 | + Media |
| 14 | + Font |
| 15 | + Script |
| 16 | + TextTrack |
| 17 | + XHR |
| 18 | + Fetch |
| 19 | + Prefetch |
| 20 | + EventSource |
| 21 | + WebSocket |
| 22 | + Manifest |
| 23 | + SignedExchange |
| 24 | + Ping |
| 25 | + CSPViolationReport |
| 26 | + Preflight |
| 27 | + Other |
| 28 | + |
| 29 | + # Unique request identifier. |
| 30 | + type RequestId extends string |
| 31 | + |
| 32 | + # UTC time in seconds, counted from January 1, 1970. |
| 33 | + type TimeSinceEpoch extends number |
| 34 | + |
| 35 | + # Monotonically increasing time in seconds since an arbitrary point in the past. |
| 36 | + type MonotonicTime extends number |
| 37 | + |
| 38 | + # Information about the request initiator. |
| 39 | + type Initiator extends object |
| 40 | + properties |
| 41 | + # Type of this initiator. |
| 42 | + enum type |
| 43 | + parser |
| 44 | + script |
| 45 | + preload |
| 46 | + SignedExchange |
| 47 | + preflight |
| 48 | + other |
| 49 | + # Initiator JavaScript stack trace, set for Script only. |
| 50 | + # Requires the Debugger domain to be enabled. |
| 51 | + optional Runtime.StackTrace stack |
| 52 | + # Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type. |
| 53 | + optional string url |
| 54 | + # Initiator line number, set for Parser type or for Script type (when script is importing |
| 55 | + # module) (0-based). |
| 56 | + optional number lineNumber |
| 57 | + # Initiator column number, set for Parser type or for Script type (when script is importing |
| 58 | + # module) (0-based). |
| 59 | + optional number columnNumber |
| 60 | + # Set if another request triggered this request (e.g. preflight). |
| 61 | + optional RequestId requestId |
| 62 | + |
| 63 | + # HTTP request data. |
| 64 | + type Request extends object |
| 65 | + properties |
| 66 | + string url |
| 67 | + string method |
| 68 | + Headers headers |
| 69 | + boolean hasPostData |
| 70 | + |
| 71 | + # HTTP response data. |
| 72 | + type Response extends object |
| 73 | + properties |
| 74 | + string url |
| 75 | + integer status |
| 76 | + string statusText |
| 77 | + Headers headers |
| 78 | + string mimeType |
| 79 | + string charset |
| 80 | + |
| 81 | + # Request / response headers as keys / values of JSON object. |
| 82 | + type Headers extends object |
| 83 | + |
| 84 | + type LoadNetworkResourcePageResult extends object |
| 85 | + properties |
| 86 | + boolean success |
| 87 | + optional IO.StreamHandle stream |
| 88 | + |
| 89 | + # WebSocket response data. |
| 90 | + type WebSocketResponse extends object |
| 91 | + properties |
| 92 | + # HTTP response status code. |
| 93 | + integer status |
| 94 | + # HTTP response status text. |
| 95 | + string statusText |
| 96 | + # HTTP response headers. |
| 97 | + Headers headers |
| 98 | + |
| 99 | + # Disables network tracking, prevents network events from being sent to the client. |
| 100 | + command disable |
| 101 | + |
| 102 | + # Enables network tracking, network events will now be delivered to the client. |
| 103 | + command enable |
| 104 | + parameters |
| 105 | + # Buffer size in bytes to use when preserving network payloads (XHRs, etc). |
| 106 | + experimental optional integer maxTotalBufferSize |
| 107 | + # Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). |
| 108 | + experimental optional integer maxResourceBufferSize |
| 109 | + |
| 110 | + # Returns post data sent with the request. Returns an error when no data was sent with the request. |
| 111 | + command getRequestPostData |
| 112 | + parameters |
| 113 | + # Identifier of the network request to get content for. |
| 114 | + RequestId requestId |
| 115 | + returns |
| 116 | + # Request body string, omitting files from multipart requests |
| 117 | + string postData |
| 118 | + |
| 119 | + # Returns content served for the given request. |
| 120 | + command getResponseBody |
| 121 | + parameters |
| 122 | + # Identifier of the network request to get content for. |
| 123 | + RequestId requestId |
| 124 | + returns |
| 125 | + # Response body. |
| 126 | + string body |
| 127 | + # True, if content was sent as base64. |
| 128 | + boolean base64Encoded |
| 129 | + |
| 130 | + # Enables streaming of the response for the given requestId. |
| 131 | + # If enabled, the dataReceived event contains the data that was received during streaming. |
| 132 | + experimental command streamResourceContent |
| 133 | + parameters |
| 134 | + # Identifier of the request to stream. |
| 135 | + RequestId requestId |
| 136 | + returns |
| 137 | + # Data that has been buffered until streaming is enabled. |
| 138 | + binary bufferedData |
| 139 | + # Fetches the resource and returns the content. |
| 140 | + command loadNetworkResource |
| 141 | + parameters |
| 142 | + # URL of the resource to get content for. |
| 143 | + string url |
| 144 | + returns |
| 145 | + LoadNetworkResourcePageResult resource |
| 146 | + |
| 147 | + # Fired when page is about to send HTTP request. |
| 148 | + event requestWillBeSent |
| 149 | + parameters |
| 150 | + # Request identifier. |
| 151 | + RequestId requestId |
| 152 | + # Request data. |
| 153 | + Request request |
| 154 | + # Request initiator. |
| 155 | + Initiator initiator |
| 156 | + # Timestamp. |
| 157 | + MonotonicTime timestamp |
| 158 | + # Timestamp. |
| 159 | + TimeSinceEpoch wallTime |
| 160 | + |
| 161 | + # Fired when HTTP response is available. |
| 162 | + event responseReceived |
| 163 | + parameters |
| 164 | + # Request identifier. |
| 165 | + RequestId requestId |
| 166 | + # Timestamp. |
| 167 | + MonotonicTime timestamp |
| 168 | + # Resource type. |
| 169 | + ResourceType type |
| 170 | + # Response data. |
| 171 | + Response response |
| 172 | + |
| 173 | + event loadingFailed |
| 174 | + parameters |
| 175 | + # Request identifier. |
| 176 | + RequestId requestId |
| 177 | + # Timestamp. |
| 178 | + MonotonicTime timestamp |
| 179 | + # Resource type. |
| 180 | + ResourceType type |
| 181 | + # Error message. |
| 182 | + string errorText |
| 183 | + |
| 184 | + event loadingFinished |
| 185 | + parameters |
| 186 | + # Request identifier. |
| 187 | + RequestId requestId |
| 188 | + # Timestamp. |
| 189 | + MonotonicTime timestamp |
| 190 | + |
| 191 | + # Fired when data chunk was received over the network. |
| 192 | + event dataReceived |
| 193 | + parameters |
| 194 | + # Request identifier. |
| 195 | + RequestId requestId |
| 196 | + # Timestamp. |
| 197 | + MonotonicTime timestamp |
| 198 | + # Data chunk length. |
| 199 | + integer dataLength |
| 200 | + # Actual bytes received (might be less than dataLength for compressed encodings). |
| 201 | + integer encodedDataLength |
| 202 | + # Data that was received. |
| 203 | + experimental optional binary data |
| 204 | + # Fired upon WebSocket creation. |
| 205 | + event webSocketCreated |
| 206 | + parameters |
| 207 | + # Request identifier. |
| 208 | + RequestId requestId |
| 209 | + # WebSocket request URL. |
| 210 | + string url |
| 211 | + # Request initiator. |
| 212 | + Initiator initiator |
| 213 | + # Fired when WebSocket is closed. |
| 214 | + event webSocketClosed |
| 215 | + parameters |
| 216 | + # Request identifier. |
| 217 | + RequestId requestId |
| 218 | + # Timestamp. |
| 219 | + MonotonicTime timestamp |
| 220 | + # Fired when WebSocket handshake response becomes available. |
| 221 | + event webSocketHandshakeResponseReceived |
| 222 | + parameters |
| 223 | + # Request identifier. |
| 224 | + RequestId requestId |
| 225 | + # Timestamp. |
| 226 | + MonotonicTime timestamp |
| 227 | + # WebSocket response data. |
| 228 | + WebSocketResponse response |
0 commit comments