feat(mcp): refactor network into requests + request commands#40447
feat(mcp): refactor network into requests + request commands#40447yury-s merged 3 commits intomicrosoft:mainfrom
Conversation
Adds --response-body and --response-headers options to the network CLI command, and corresponding responseBody / responseHeaders parameters to the browser_network_requests MCP tool. Binary response bodies are rendered as a placeholder using @isomorphic/mimeType detection. Fixes microsoft/playwright-cli#377
This comment has been minimized.
This comment has been minimized.
Replace `playwright-cli network` with two commands: - `requests` — numbered list of requests - `request <num>` — full details for one request, response body saved to a file under .playwright-cli/ Add the corresponding `browser_network_request` MCP tool. Move both CLI commands to the `network` category. Fixes microsoft/playwright-cli#377
pavelfeldman
left a comment
There was a problem hiding this comment.
This does not play nice w/ --json and --raw. There should be a way to say
cat playwright-cli request-body 1 | ws
Add `request-headers`, `request-body`, `response-headers`, `response-body` CLI commands and a `part` parameter on the `browser_network_request` MCP tool to extract individual parts of a numbered request. Pipe-friendly with the global `--raw` and `--json` flags.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@microsoft-github-policy-service rerun |
1 similar comment
|
@microsoft-github-policy-service rerun |
Test results for "tests 1"10 flaky41464 passed, 847 skipped Merge workflow run. |
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"34 failed 6761 passed, 927 skipped Merge workflow run. |
Summary
playwright-cli networkinto:requests— numbered list of requests (with stable indexes)request <num>— full details for one numbered request, response body saved to a file under.playwright-cli/request-headers <num>,request-body <num>,response-headers <num>,response-body <num>— extract a single part (pipe-friendly with--raw/--json)browser_network_requestMCP tool with optionalpartparameternetworkcategoryFixes microsoft/playwright-cli#377