* Provides a response for the network. * * @param {ProvideResponseParameters} params - The parameters for providing the response. * @throws {Error} If params is not an instance of ProvideResponseParameters. * @returns {Promise } A promise that resolves when the command is sent.
(params)
| 348 | * @returns {Promise<void>} A promise that resolves when the command is sent. |
| 349 | */ |
| 350 | async provideResponse(params) { |
| 351 | if (!(params instanceof ProvideResponseParameters)) { |
| 352 | throw new Error(`Params must be an instance of ProvideResponseParameters. Received:'${params}'`) |
| 353 | } |
| 354 | |
| 355 | const command = { |
| 356 | method: 'network.provideResponse', |
| 357 | params: Object.fromEntries(params.asMap()), |
| 358 | } |
| 359 | |
| 360 | await this.bidi.send(command) |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Sets the cache behavior for network requests. |
no test coverage detected