MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / setPlaywrightRequestHeaders

Method setPlaywrightRequestHeaders

lib/helper/Playwright.js:1490–1495  ·  view source on GitHub ↗

* Set headers for all next requests * * ```js * I.setPlaywrightRequestHeaders({ * 'X-Sent-By': 'CodeceptJS', * }); * ``` * * @param {object} customHeaders headers to set

(customHeaders)

Source from the content-addressed store, hash-verified

1488 * @param {object} customHeaders headers to set
1489 */
1490 async setPlaywrightRequestHeaders(customHeaders) {
1491 if (!customHeaders) {
1492 throw new Error('Cannot send empty headers.')
1493 }
1494 return this.browserContext.setExtraHTTPHeaders(customHeaders)
1495 }
1496
1497 /**
1498 * {{> moveCursorTo }}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected