Version
1.59.1
Steps to reproduce
I'm using page.request.get to get JSON data, but cookies are not sent along the request.
I have to use the following code to make it work :
const http_get = async (url: string) => {
const cookies = await page.context().cookies(url);
const data = await page.request.get(url, {
headers: { Cookie: cookies.map((c) => `${c.name}=${c.value}`).join('; ') },
});
return await data.json();
};
Expected behavior
page.request.get should send the current context cookie as state in the doc.
Actual behavior
Cookie are not sent.
Additional context
No response
Environment
Windows using node and pnpm.
"playwright-chromium": "^1.59.1"
System:
OS: Windows 11 10.0.26200
CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H
Memory: 2.96 GB / 15.73 GB
Binaries:
Node: 24.14.1 - C:\Users\nico\.vite-plus\js_runtime\node\24.14.1\node.EXE
npm: 11.11.0 - C:\Users\nico\.vite-plus\js_runtime\node\24.14.1\npm.CMD
pnpm: 10.33.0 - D:\.bin\.pnpm\pnpm.CMD
bun: 1.3.11 - C:\Users\nico\.bun\bin\bun.EXE
npmPackages:
playwright-chromium: ^1.59.1 => 1.59.1
Version
1.59.1
Steps to reproduce
I'm using
page.request.getto get JSON data, but cookies are not sent along the request.I have to use the following code to make it work :
Expected behavior
page.request.getshould send the current context cookie as state in the doc.Actual behavior
Cookie are not sent.
Additional context
No response
Environment