{
  "slug": "apirequestcontext-request-methods-type-json-responses-c36a0b59a523",
  "title": "APIRequestContext request methods type JSON responses",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-04T22:40:31.000Z",
  "announced_at": "2026-09-04T22:40:31.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "For a typed API request in Playwright v1.63.0 or later, pass the response type to `request.get<T>(url)` and use `response.json()` as `T`.",
    "examples": [
      "const response = await request.get<User>('/api/users/42');\nconst user = await response.json();"
    ],
    "gotchas": [
      "Version: v1.63.0",
      "T (type argument) (required): Types the response from `json()`; use the expected response type, such as `User`.",
      "url (required): Target URL for the GET request.",
      "Prerequisite: Playwright v1.63.0 or later; the typed request method behavior was added in v1.63."
    ]
  },
  "why_it_matters": "Make a typed API request in a test and use the typed JSON response.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.63.0",
    "https://playwright.dev/docs/api/class-apirequestcontext#api-request-context-get"
  ],
  "rank": 0.98038,
  "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": "augsep-20261008",
    "verdict_id": "augsep-20261008:augsep-20261008-579bf8375159b0fd-9:gate",
    "evidence_hash": "8f458d0a9fe7d706ecdbbba7433f7d4b9f5359e0c90f3581627b8ce9e8b79bc6"
  },
  "review": {
    "draft_hash": "6cd6efaaff67e1ea9f6b15dfc23d91f66a3c14705140ed3fb9b81a170d633bca",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "augsep-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.63 (>= 0.6 needed)."
  }
}
