{
  "slug": "playwright-cli-route-mocks-support-url-patterns-and-route-management-aff8f81791e4",
  "title": "playwright-cli route mocks support URL patterns and route management",
  "tools": [
    "playwright-mcp"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-02-04T00:02:29.000Z",
  "announced_at": "2026-02-04T00:02:29.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need frontend development or testing without a backend, use `playwright-cli route` to mock requests by URL pattern, then use `route-list` or `unroute` to manage routes.",
    "examples": [
      "playwright-cli route \"**/api/users\" --body='[{\"id\":1,\"name\":\"Alice\"}]' --content-type=application/json",
      "playwright-cli route \"**/api/data\" --body='{\"ok\":true}' --header=\"X-Custom: value\"",
      "playwright-cli route-list\nplaywright-cli unroute \"<URL pattern>\"\nplaywright-cli unroute"
    ],
    "gotchas": [
      "Version: v0.0.63",
      "<pattern> (required): URL pattern to match; examples include `**/api/users`, `**/api/*/details`, `**/*.{png,jpg,jpeg}`, and `**/search?q=*`.",
      "--status: HTTP status code for the mock response; release example uses `404`.",
      "--body: Response body, such as a JSON string.",
      "--content-type: Content type for the response, such as `application/json`.",
      "--header: Custom header in `Name: Value` format.",
      "--remove-header: Comma-separated request headers to strip, such as `cookie,authorization`.",
      "unroute <pattern>: Remove routes matching a URL pattern; omit the pattern to remove all routes.",
      "Routes target URL patterns; the spans describe glob-style pattern support."
    ]
  },
  "why_it_matters": "Mock backend responses while developing or testing a web application's frontend.",
  "sources": [
    "https://github.com/microsoft/playwright-mcp/releases/tag/v0.0.63"
  ],
  "rank": 0.9806,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-d3bc847dca2d1f46-1:gate",
    "evidence_hash": "66452dcb24860b8d0a54286ea25b704580660682f5b75476dd21145a89ef4299"
  },
  "review": {
    "draft_hash": "ed09fa9349bf663fea405a40d5ef5947e6230b7c8b543b7da04c1dd9571c7f5c",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.73 (>= 0.6 needed)."
  }
}
