{
  "format": 3,
  "id": "3.2",
  "title": "HAR matching, recorded responses, missing entries and recording",
  "layers": {
    "server": {
      "label": "Server"
    },
    "client": {
      "label": "Client"
    }
  },
  "lanes": {
    "server": {
      "label": "PLAYWRIGHT SERVER · HAR LOOKUP",
      "layer": "server"
    },
    "client": {
      "label": "NODE CLIENT",
      "layer": "client"
    }
  },
  "frames": {},
  "nodes": {
    "match": {
      "label": "Exact URL + method",
      "layer": "server",
      "lane": "server"
    },
    "body": {
      "label": "Conditional POST body",
      "layer": "server",
      "lane": "server"
    },
    "headers": {
      "label": "Matching headers",
      "layer": "server",
      "lane": "server"
    },
    "response": {
      "label": "Recorded response",
      "layer": "server",
      "lane": "server"
    },
    "redirect": {
      "label": "Recorded redirect",
      "layer": "server",
      "lane": "server"
    },
    "missing": {
      "label": "No matching entry",
      "layer": "server",
      "lane": "server"
    },
    "abort": {
      "label": "abort()",
      "layer": "client",
      "lane": "client"
    },
    "fallback": {
      "label": "fallback()",
      "layer": "client",
      "lane": "client"
    },
    "record": {
      "label": "update: true",
      "layer": "client",
      "lane": "client"
    },
    "defaults": {
      "label": "minimal + attached",
      "layer": "client",
      "lane": "client"
    },
    "export": {
      "label": "close() exports HAR",
      "layer": "client",
      "lane": "client"
    }
  },
  "edges": {
    "mb": {
      "from": "match",
      "to": "body",
      "label": "filter"
    },
    "bh": {
      "from": "body",
      "to": "headers",
      "label": "candidates"
    },
    "hr": {
      "from": "headers",
      "to": "response",
      "label": "select"
    },
    "ma": {
      "from": "missing",
      "to": "abort",
      "label": "default abort"
    },
    "mf": {
      "from": "missing",
      "to": "fallback",
      "label": "fallback"
    }
  },
  "scenarios": [
    {
      "id": "how",
      "label": "How HAR supplies responses",
      "display": {
        "counterLabel": false,
        "edges": "progressive",
        "edgeBadges": true,
        "nodeBadges": false,
        "log": "incremental"
      },
      "steps": [
        {
          "id": "match-the-full-request",
          "title": "Match the full request",
          "text": "The exact URL string and method must match.",
          "show": [
            "match"
          ],
          "current": [
            "match"
          ],
          "edges": [],
          "defs": [
            "match"
          ],
          "log": [],
          "sources": [
            {
              "label": "harRouter.ts:50-57",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L50-L57"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "compare-post-bodies-conditionall",
          "title": "Compare POST bodies conditionally",
          "text": "Compare bodies only when both exist. Multipart boundary strings can differ.",
          "show": [
            "body"
          ],
          "current": [
            "body"
          ],
          "edges": [
            "mb"
          ],
          "defs": [
            "body"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "matching-headers-choose-among-ca",
          "title": "Matching headers choose among candidates",
          "text": "With several candidates, most matching headers wins. A single match needs no comparison.",
          "show": [
            "headers"
          ],
          "current": [
            "headers"
          ],
          "edges": [
            "bh"
          ],
          "defs": [
            "headers"
          ],
          "code": "headers",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "use-the-recorded-response",
          "title": "Use the recorded response",
          "text": "The response uses the recorded status, headers and loaded body.",
          "show": [
            "response"
          ],
          "current": [
            "response"
          ],
          "edges": [
            "hr"
          ],
          "defs": [
            "response"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "follow-recorded-redirects",
          "title": "Follow recorded redirects",
          "text": "A navigation to another recorded URL changes the document URL.",
          "show": [
            "redirect"
          ],
          "current": [
            "redirect"
          ],
          "edges": [],
          "defs": [
            "redirect"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:142-155",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L142-L155"
            },
            {
              "label": "harBackend.ts:60-62",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L60-L62"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "choose-the-missing-policy",
          "title": "Choose the missing policy",
          "text": "Missing entries abort by default. notFound: fallback passes the request onward; lookup errors use the same policy and appear in API debug logs.",
          "show": [
            "missing",
            "abort",
            "fallback"
          ],
          "current": [
            "missing",
            "abort",
            "fallback"
          ],
          "edges": [
            "ma",
            "mf"
          ],
          "defs": [
            "missing",
            "abort",
            "fallback"
          ],
          "code": "fallback",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "record-instead-of-replay",
          "title": "Record instead of replay",
          "text": "update: true records; defaults are minimal mode and attached content.",
          "show": [
            "record",
            "defaults"
          ],
          "current": [
            "record",
            "defaults"
          ],
          "edges": [],
          "defs": [
            "record",
            "defaults"
          ],
          "code": "record",
          "log": [],
          "sources": [
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "tracing.ts:129-143",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/tracing.ts#L129-L143"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "close-to-export",
          "title": "Close to export",
          "text": "Close the context to export. Keep attached body files or ZIP entries.",
          "show": [
            "export"
          ],
          "current": [
            "export"
          ],
          "edges": [],
          "defs": [
            "export"
          ],
          "code": "record",
          "log": [],
          "sources": [
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        }
      ]
    },
    {
      "id": "match",
      "label": "Match",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Matching headers choose the response",
        "text": "Example: two recorded POST /api requests with equal bodies."
      },
      "steps": [
        {
          "id": "the-url-string-and-method-must-m",
          "title": "The URL string and method must match the recorded request.",
          "text": "The URL string and method must match the recorded request.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "match"
          ],
          "edges": [],
          "defs": [
            "example0_0"
          ],
          "code": "headers",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "for-post-playwright-compares-bod",
          "title": "For POST, Playwright compares bodies only when both requests have one.",
          "text": "For POST, Playwright compares bodies only when both requests have one.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "body"
          ],
          "edges": [
            "mb"
          ],
          "defs": [
            "example0_1"
          ],
          "code": "headers",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "b-has-two-matching-headers-a-has",
          "title": "B has two matching headers; A has one. B wins.",
          "text": "B has two matching headers; A has one. B wins.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "headers"
          ],
          "edges": [
            "bh"
          ],
          "defs": [
            "example0_2"
          ],
          "code": "headers",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "the-response-uses-b-s-recorded-s",
          "title": "The response uses B's recorded status, headers and body.",
          "text": "The response uses B's recorded status, headers and body.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "response"
          ],
          "edges": [
            "hr"
          ],
          "defs": [
            "example0_3"
          ],
          "code": "headers",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "match",
          "step": "the-url-string-and-method-must-m",
          "log": []
        },
        {
          "node": "body",
          "step": "for-post-playwright-compares-bod",
          "log": [],
          "edge": "mb"
        },
        {
          "node": "headers",
          "step": "b-has-two-matching-headers-a-has",
          "log": [],
          "edge": "bh"
        },
        {
          "node": "response",
          "step": "the-response-uses-b-s-recorded-s",
          "log": [],
          "edge": "hr"
        }
      ]
    },
    {
      "id": "redirect",
      "label": "Redirect",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Follow the recorded redirect",
        "text": "Example: a recorded 302 from POST /api to /done."
      },
      "steps": [
        {
          "id": "this-recorded-302-changes-post-t",
          "title": "This recorded 302 changes POST to GET at the destination.",
          "text": "This recorded 302 changes POST to GET at the destination.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "redirect"
          ],
          "edges": [],
          "defs": [
            "example1_0"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:142-155",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L142-L155"
            },
            {
              "label": "harBackend.ts:60-62",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L60-L62"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "a-navigation-to-another-recorded",
          "title": "A navigation to another recorded URL restarts there.",
          "text": "A navigation to another recorded URL restarts there.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "match"
          ],
          "edges": [],
          "defs": [
            "example1_1"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:142-155",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L142-L155"
            },
            {
              "label": "harBackend.ts:60-62",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L60-L62"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "the-matching-destination-supplie",
          "title": "The matching destination supplies its recorded response.",
          "text": "The matching destination supplies its recorded response.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "response"
          ],
          "edges": [],
          "defs": [
            "example1_2"
          ],
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:142-155",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L142-L155"
            },
            {
              "label": "harBackend.ts:60-62",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L60-L62"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "redirect",
          "step": "this-recorded-302-changes-post-t",
          "log": []
        },
        {
          "node": "match",
          "step": "a-navigation-to-another-recorded",
          "log": []
        },
        {
          "node": "response",
          "step": "the-matching-destination-supplie",
          "log": []
        }
      ]
    },
    {
      "id": "missing",
      "label": "Missing",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Choose what happens to a missing request",
        "text": "The default is abort. Fallback lets another matching handler answer."
      },
      "steps": [
        {
          "id": "there-is-no-matching-recorded-re",
          "title": "There is no matching recorded request.",
          "text": "There is no matching recorded request.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "missing"
          ],
          "edges": [],
          "defs": [
            "example2_0"
          ],
          "code": "fallback",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "without-notfound-the-missing-req",
          "title": "Without notFound, the missing request aborts.",
          "text": "Without notFound, the missing request aborts.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "abort"
          ],
          "edges": [
            "ma"
          ],
          "defs": [
            "example2_1"
          ],
          "code": "fallback",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "set-notfound-to-fallback-to-pass",
          "title": "Set notFound to fallback to pass the request onward.",
          "text": "Set notFound to fallback to pass the request onward.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "fallback"
          ],
          "edges": [
            "mf"
          ],
          "defs": [
            "example2_2"
          ],
          "code": "fallback",
          "log": [],
          "sources": [
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            },
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "missing",
          "step": "there-is-no-matching-recorded-re",
          "log": []
        },
        {
          "node": "abort",
          "step": "without-notfound-the-missing-req",
          "log": []
        },
        {
          "node": "fallback",
          "step": "set-notfound-to-fallback-to-pass",
          "log": []
        }
      ]
    },
    {
      "id": "update",
      "label": "Update",
      "display": {
        "counterLabel": true,
        "edges": "all",
        "edgeBadges": true,
        "nodeBadges": true,
        "log": "incremental"
      },
      "whole": {
        "title": "Record now, export when the context closes",
        "text": "update: true records traffic instead of replaying the HAR."
      },
      "steps": [
        {
          "id": "update-true-starts-recording-ins",
          "title": "update: true starts recording instead of replay.",
          "text": "update: true starts recording instead of replay.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "record"
          ],
          "edges": [],
          "defs": [
            "example3_0"
          ],
          "code": "record",
          "log": [],
          "sources": [
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "tracing.ts:129-143",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/tracing.ts#L129-L143"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "the-defaults-are-minimal-mode-an",
          "title": "The defaults are minimal mode and attached content.",
          "text": "The defaults are minimal mode and attached content.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "defaults"
          ],
          "edges": [],
          "defs": [
            "example3_1"
          ],
          "code": "record",
          "log": [],
          "sources": [
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "tracing.ts:129-143",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/tracing.ts#L129-L143"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        },
        {
          "id": "close-the-context-to-export-keep",
          "title": "Close the context to export. Keep attached bodies with the HAR.",
          "text": "Close the context to export. Keep attached bodies with the HAR.",
          "show": [
            "match",
            "body",
            "headers",
            "response",
            "redirect",
            "missing",
            "abort",
            "fallback",
            "record",
            "defaults",
            "export"
          ],
          "current": [
            "export"
          ],
          "edges": [],
          "defs": [
            "example3_2"
          ],
          "code": "record",
          "log": [],
          "sources": [
            {
              "label": "browserContext.ts:402-412",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
            },
            {
              "label": "tracing.ts:129-143",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/tracing.ts#L129-L143"
            },
            {
              "label": "browserContext.ts:525-534",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
            },
            {
              "label": "harTracer.ts:554-567",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/har/harTracer.ts#L554-L567"
            },
            {
              "label": "harBackend.ts:78-93",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L78-L93"
            },
            {
              "label": "harBackend.ts:101-103",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
            },
            {
              "label": "harBackend.ts:104-118",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
            },
            {
              "label": "harBackend.ts:124-135",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
            },
            {
              "label": "harBackend.ts:164-171",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L164-L171"
            },
            {
              "label": "harBackend.ts:64-72",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
            },
            {
              "label": "harBackend.ts:50-58",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
            },
            {
              "label": "harRouter.ts:100-109",
              "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
            }
          ],
          "deeper": [
            {
              "title": "3.1 Fallback passes the request to the next handler",
              "href": "/3-network/3-1-who-answers-a-request/"
            }
          ]
        }
      ],
      "flow": [
        {
          "node": "record",
          "step": "update-true-starts-recording-ins",
          "log": []
        },
        {
          "node": "defaults",
          "step": "the-defaults-are-minimal-mode-an",
          "log": []
        },
        {
          "node": "export",
          "step": "close-the-context-to-export-keep",
          "log": []
        }
      ]
    }
  ],
  "definitions": {
    "match": {
      "term": "Exact request",
      "text": "The URL string and method must match the recorded request."
    },
    "body": {
      "term": "POST body",
      "text": "Bodies are compared only when both exist; multipart boundaries can differ."
    },
    "headers": {
      "term": "Matching headers",
      "text": "Multiple candidates compete by matching-header count. Names ignore case; values must match."
    },
    "response": {
      "term": "Recorded response",
      "text": "The recorded status, headers and body supply the response. Bodies load from inline text, base64, files or ZIP entries."
    },
    "redirect": {
      "term": "Recorded redirect",
      "text": "Recorded redirects are followed; 301/302 changes POST to GET, and 303 changes non-GET/HEAD methods."
    },
    "missing": {
      "term": "Missing entry",
      "text": "No matching recorded request returns noentry."
    },
    "abort": {
      "term": "Default abort",
      "text": "A missing request aborts unless notFound is fallback."
    },
    "fallback": {
      "term": "Fallback",
      "text": "A missing request passes onward with notFound: fallback."
    },
    "record": {
      "term": "Update",
      "text": "update: true records instead of replaying."
    },
    "defaults": {
      "term": "Recording defaults",
      "text": "Recording defaults to minimal mode and attached content."
    },
    "export": {
      "term": "Export",
      "text": "context.close() exports the recording; keep attached files or ZIP entries."
    },
    "example0_0": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example0_1": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example0_2": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example0_3": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example1_0": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded: POST /api → 302 /done · Next recorded request: GET /done | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example1_1": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Navigation URL changes to /done · Recorded status, headers and body | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example1_2": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Response from recorded GET /done · Recorded status, headers and body | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example2_0": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example2_1": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: Default: abort → request fails · No recorded response | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example2_2": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: notFound: 'fallback' · → next matching handler · see 3.1 | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example3_0": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: update: true → record, not replay · context.close() → export HAR · Keep attached body files or ZIP"
    },
    "example3_1": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: Defaults: minimal mode · Attached bodies use file references · Keep body files or ZIP entries"
    },
    "example3_2": {
      "term": "Example state",
      "text": "Match the request: Same URL and method · POST: compare bodies if both exist · A: 1 match · B: 2 matches → B | Recorded response: Recorded status, headers and body · Inline text, base64, file or ZIP | Missing request: No matching entry → abort · notFound: 'fallback' → next handler | Record and save: context.close() → export HAR · Attached bodies: keep their files · or keep their ZIP entries"
    }
  },
  "code": {
    "headers": {
      "title": "Inside Playwright · harBackend.ts",
      "source": {
        "label": "harBackend.ts:124-135",
        "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
      },
      "lines": [
        "// Disambiguate using headers - then one",
        "// with most matching headers wins.",
        "if (entries.length > 1) {",
        "  const list: {",
        "    candidate: har.Entry,",
        "    matchingHeaders: number",
        "  }[] = [];",
        "  for (const candidate of entries) {",
        "    const matchingHeaders =",
        "      countMatchingHeaders(",
        "        candidate.request.headers, headers);",
        "    list.push({",
        "      candidate, matchingHeaders",
        "    });",
        "  }"
      ]
    },
    "fallback": {
      "title": "In your test · allow a missing entry",
      "lines": [
        "// ✗ Default aborts a missing entry",
        "// await context.routeFromHAR('app.har');",
        "// ✓ Let another handler answer the miss",
        "await context.routeFromHAR('app.har', {",
        "  notFound: 'fallback',",
        "});"
      ]
    },
    "record": {
      "title": "In your test · save the recording",
      "lines": [
        "await context.routeFromHAR('app.har', {",
        "  update: true,",
        "});",
        "await page.goto('https://app.example');",
        "// ✗ Do not copy the HAR before close",
        "// ✓ Close exports the recording",
        "await context.close();"
      ]
    }
  },
  "conceptScenario": "how",
  "concepts": [
    {
      "label": "Playwright server · HAR lookup",
      "layer": "server",
      "items": [
        {
          "definition": "match",
          "short": "The URL string and method must match the recorded request.",
          "nodes": [
            "match"
          ],
          "step": {
            "step": "match-the-full-request"
          },
          "source": {
            "label": "harBackend.ts:101-103",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L101-L103"
          }
        },
        {
          "definition": "body",
          "short": "Bodies are compared only when both exist.",
          "nodes": [
            "body"
          ],
          "step": {
            "step": "compare-post-bodies-conditionall"
          },
          "source": {
            "label": "harBackend.ts:104-118",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L104-L118"
          }
        },
        {
          "definition": "headers",
          "short": "Multiple candidates compete by matching-header count.",
          "nodes": [
            "headers"
          ],
          "step": {
            "step": "matching-headers-choose-among-ca"
          },
          "source": {
            "label": "harBackend.ts:124-135",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L124-L135"
          }
        },
        {
          "definition": "response",
          "short": "Successful lookup returns recorded status, headers and body.",
          "nodes": [
            "response"
          ],
          "step": {
            "step": "use-the-recorded-response"
          },
          "source": {
            "label": "harBackend.ts:64-72",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L64-L72"
          }
        },
        {
          "definition": "redirect",
          "short": "Recorded redirects are followed.",
          "nodes": [
            "redirect"
          ],
          "step": {
            "step": "follow-recorded-redirects"
          },
          "source": {
            "label": "harBackend.ts:142-155",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L142-L155"
          }
        },
        {
          "definition": "missing",
          "short": "No matching recorded request returns noentry.",
          "nodes": [
            "missing"
          ],
          "step": {
            "step": "choose-the-missing-policy"
          },
          "source": {
            "label": "harBackend.ts:50-58",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/server/harBackend.ts#L50-L58"
          }
        }
      ]
    },
    {
      "label": "Node client · policy and recording",
      "layer": "client",
      "items": [
        {
          "definition": "abort",
          "short": "Replay defaults to abort.",
          "nodes": [
            "abort"
          ],
          "step": {
            "step": "choose-the-missing-policy"
          },
          "source": {
            "label": "browserContext.ts:402-412",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
          }
        },
        {
          "definition": "fallback",
          "short": "A missing request passes onward with notFound: fallback.",
          "nodes": [
            "fallback"
          ],
          "step": {
            "step": "choose-the-missing-policy"
          },
          "source": {
            "label": "harRouter.ts:100-109",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/harRouter.ts#L100-L109"
          }
        },
        {
          "definition": "record",
          "short": "update: true records instead of replaying.",
          "nodes": [
            "record"
          ],
          "step": {
            "step": "record-instead-of-replay"
          },
          "source": {
            "label": "browserContext.ts:402-412",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L402-L412"
          }
        },
        {
          "definition": "defaults",
          "short": "Recording defaults to minimal mode and attached content.",
          "nodes": [
            "defaults"
          ],
          "step": {
            "step": "record-instead-of-replay"
          },
          "source": {
            "label": "tracing.ts:129-143",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/tracing.ts#L129-L143"
          }
        },
        {
          "definition": "export",
          "short": "Context close exports registered HAR recordings.",
          "nodes": [
            "export"
          ],
          "step": {
            "step": "close-to-export"
          },
          "source": {
            "label": "browserContext.ts:525-534",
            "url": "https://github.com/microsoft/playwright/blob/v1.65.0/packages/playwright-core/src/client/browserContext.ts#L525-L534"
          }
        }
      ]
    }
  ],
  "callouts": {
    "1": [
      "match",
      "body",
      "headers"
    ],
    "2": [
      "response",
      "redirect"
    ],
    "3": [
      "missing",
      "abort",
      "fallback"
    ],
    "4": [
      "record",
      "defaults",
      "export"
    ]
  },
  "deeper": [
    {
      "title": "3.1 Fallback passes the request to the next handler",
      "href": "/3-network/3-1-who-answers-a-request/",
      "why": "How the next matching handler gets its turn."
    }
  ]
}
