docs(route): header override propagation (#32971)

Fix https://github.com/microsoft/playwright/issues/32939
This commit is contained in:
Yury Semikhatsky 2024-10-07 13:52:55 -07:00 committed by GitHub
parent 9a6f03eb87
commit 4fe33db392
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -102,7 +102,7 @@ await page.RouteAsync("**/*", async route =>
**Details** **Details**
Note that any overrides such as [`option: url`] or [`option: headers`] only apply to the request being routed. If this request results in a redirect, overrides will not be applied to the new redirected request. If you want to propagate a header through redirects, use the combination of [`method: Route.fetch`] and [`method: Route.fulfill`] instead. The [`option: headers`] option applies to both the routed request and any redirects it initiates. However, [`option: url`], [`option: method`], and [`option: postData`] only apply to the original request and are not carried over to redirected requests.
[`method: Route.continue`] will immediately send the request to the network, other matching handlers won't be invoked. Use [`method: Route.fallback`] If you want next matching handler in the chain to be invoked. [`method: Route.continue`] will immediately send the request to the network, other matching handlers won't be invoked. Use [`method: Route.fallback`] If you want next matching handler in the chain to be invoked.

View File

@ -20614,12 +20614,12 @@ export interface Route {
* *
* **Details** * **Details**
* *
* Note that any overrides such as [`url`](https://playwright.dev/docs/api/class-route#route-continue-option-url) or * The [`headers`](https://playwright.dev/docs/api/class-route#route-continue-option-headers) option applies to both
* [`headers`](https://playwright.dev/docs/api/class-route#route-continue-option-headers) only apply to the request * the routed request and any redirects it initiates. However,
* being routed. If this request results in a redirect, overrides will not be applied to the new redirected request. * [`url`](https://playwright.dev/docs/api/class-route#route-continue-option-url),
* If you want to propagate a header through redirects, use the combination of * [`method`](https://playwright.dev/docs/api/class-route#route-continue-option-method), and
* [route.fetch([options])](https://playwright.dev/docs/api/class-route#route-fetch) and * [`postData`](https://playwright.dev/docs/api/class-route#route-continue-option-post-data) only apply to the
* [route.fulfill([options])](https://playwright.dev/docs/api/class-route#route-fulfill) instead. * original request and are not carried over to redirected requests.
* *
* [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) will immediately send the * [route.continue([options])](https://playwright.dev/docs/api/class-route#route-continue) will immediately send the
* request to the network, other matching handlers won't be invoked. Use * request to the network, other matching handlers won't be invoked. Use