diff --git a/docs/api.md b/docs/api.md index e61bb52b1e..af244348c6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -3900,10 +3900,11 @@ Continues route's request with optional overrides. ```js await page.route('**/*', (route, request) => { // Override headers - const headers = Object.assign({}, request.headers(), { + const headers = { + ...request.headers(), foo: 'bar', // set "foo" header origin: undefined, // remove "origin" header - }); + }; route.continue({headers}); }); ```