(requestId: number, options: any)
| 180 | } |
| 181 | |
| 182 | export function requestWillBeSent(requestId: number, options: any) { |
| 183 | const request: NetworkAgent.Request = { |
| 184 | url: options.url, |
| 185 | method: options.method, |
| 186 | headers: options.headers || {}, |
| 187 | postData: options.content ? options.content.toString() : '', |
| 188 | initialPriority: 'Medium', |
| 189 | referrerPolicy: 'no-referrer-when-downgrade', |
| 190 | }; |
| 191 | |
| 192 | const requestData: NetworkAgent.RequestData = { |
| 193 | requestId: requestId.toString(), |
| 194 | url: request.url, |
| 195 | request: request, |
| 196 | timestamp: getTimeStamp(), |
| 197 | type: 'Document', |
| 198 | wallTime: 0, |
| 199 | }; |
| 200 | |
| 201 | global.__inspector.requestWillBeSent(requestData); |
| 202 | } |
| 203 | |
| 204 | function getTimeStamp(): number { |
| 205 | const d = new Date(); |
nothing calls this directly
no test coverage detected