{
  "doc": {
    "id": "api/commands/request",
    "title": "cy.request()",
    "description": "Send HTTP requests from Cypress tests with cy.request() to seed data, log in, and test APIs.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/request.md",
    "version": "c4ad6f88c531de58221c73dd91a75af7138334b8",
    "updated_at": "2026-11-10T01:15:02.829Z",
    "headings": [
      {
        "id": "api/commands/request#request",
        "text": "request",
        "level": 1
      },
      {
        "id": "api/commands/request#syntax",
        "text": "Syntax",
        "level": 2
      },
      {
        "id": "api/commands/request#usage",
        "text": "Usage",
        "level": 3
      },
      {
        "id": "api/commands/request#arguments",
        "text": "Arguments",
        "level": 3
      },
      {
        "id": "api/commands/request#yields",
        "text": "Yields",
        "level": 3
      },
      {
        "id": "api/commands/request#examples",
        "text": "Examples",
        "level": 2
      },
      {
        "id": "api/commands/request#url",
        "text": "URL",
        "level": 3
      },
      {
        "id": "api/commands/request#make-a-get-request",
        "text": "Make a GET request",
        "level": 4
      },
      {
        "id": "api/commands/request#check-a-pages-html-without-visiting-it",
        "text": "Check a page's HTML without visiting it",
        "level": 4
      },
      {
        "id": "api/commands/request#method-and-url",
        "text": "Method and URL",
        "level": 3
      },
      {
        "id": "api/commands/request#send-a-delete-request",
        "text": "Send a DELETE request",
        "level": 4
      },
      {
        "id": "api/commands/request#alias-the-request-using-as",
        "text": "Alias the request using .as()",
        "level": 4
      },
      {
        "id": "api/commands/request#method-url-and-body",
        "text": "Method, URL, and Body",
        "level": 3
      },
      {
        "id": "api/commands/request#send-a-post-request-with-a-json-body",
        "text": "Send a POST request with a JSON body",
        "level": 4
      },
      {
        "id": "api/commands/request#authentication",
        "text": "Authentication",
        "level": 3
      },
      {
        "id": "api/commands/request#authenticate-with-http-basic-or-a-bearer-token",
        "text": "Authenticate with HTTP Basic or a bearer token",
        "level": 4
      },
      {
        "id": "api/commands/request#log-in-with-an-html-form-using-form-true",
        "text": "Log in with an HTML form using form: true",
        "level": 4
      },
      {
        "id": "api/commands/request#log-in-through-the-api-and-cache-it-with-cy-session",
        "text": "Log in through the API and cache it with cy.session()",
        "level": 4
      },
      {
        "id": "api/commands/request#redirects-errors-and-retries",
        "text": "Redirects, errors, and retries",
        "level": 3
      },
      {
        "id": "api/commands/request#request-a-page-without-following-redirects",
        "text": "Request a page without following redirects",
        "level": 4
      },
      {
        "id": "api/commands/request#check-every-redirect-cy-request-followed",
        "text": "Check every redirect cy.request() followed",
        "level": 4
      },
      {
        "id": "api/commands/request#test-an-error-response-with-failonstatuscode-false",
        "text": "Test an error response with failOnStatusCode: false",
        "level": 4
      },
      {
        "id": "api/commands/request#retry-a-request-that-fails-with-a-server-error",
        "text": "Retry a request that fails with a server error",
        "level": 4
      },
      {
        "id": "api/commands/request#give-a-slow-endpoint-more-time-with-timeout",
        "text": "Give a slow endpoint more time with timeout",
        "level": 4
      },
      {
        "id": "api/commands/request#files",
        "text": "Files",
        "level": 3
      },
      {
        "id": "api/commands/request#download-a-pdf-file",
        "text": "Download a PDF file",
        "level": 4
      },
      {
        "id": "api/commands/request#get-the-data-url-of-an-image",
        "text": "Get the data URL of an image",
        "level": 4
      },
      {
        "id": "api/commands/request#upload-a-file-with-multipart-form-data",
        "text": "Upload a file with multipart/form-data",
        "level": 4
      },
      {
        "id": "api/commands/request#api-testing-workflows-with-cy-request",
        "text": "API testing workflows with cy.request()",
        "level": 3
      },
      {
        "id": "api/commands/request#send-query-parameters-with-qs",
        "text": "Send query parameters with qs",
        "level": 4
      },
      {
        "id": "api/commands/request#create-a-record-then-use-its-id-in-later-requests",
        "text": "Create a record, then use its ID in later requests",
        "level": 4
      },
      {
        "id": "api/commands/request#assert-on-the-status-headers-and-response-time",
        "text": "Assert on the status, headers, and response time",
        "level": 4
      },
      {
        "id": "api/commands/request#type-the-response-body-in-typescript",
        "text": "Type the response body in TypeScript",
        "level": 4
      },
      {
        "id": "api/commands/request#poll-an-endpoint-until-a-job-finishes",
        "text": "Poll an endpoint until a job finishes",
        "level": 4
      },
      {
        "id": "api/commands/request#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/request#how-cy-request-sends-a-request",
        "text": "How cy.request() sends a request",
        "level": 3
      },
      {
        "id": "api/commands/request#how-cy-request-resolves-a-relative-url",
        "text": "How cy.request() resolves a relative URL",
        "level": 3
      },
      {
        "id": "api/commands/request#how-cy-request-sends-and-stores-cookies",
        "text": "How cy.request() sends and stores cookies",
        "level": 3
      },
      {
        "id": "api/commands/request#how-cy-request-follows-redirects",
        "text": "How cy.request() follows redirects",
        "level": 3
      },
      {
        "id": "api/commands/request#how-cy-request-handles-request-and-response-bodies",
        "text": "How cy.request() handles request and response bodies",
        "level": 3
      },
      {
        "id": "api/commands/request#request-body-serialization",
        "text": "Request body serialization",
        "level": 4
      },
      {
        "id": "api/commands/request#response-body-parsing",
        "text": "Response body parsing",
        "level": 4
      },
      {
        "id": "api/commands/request#rules",
        "text": "Rules",
        "level": 2
      },
      {
        "id": "api/commands/request#requirements",
        "text": "Requirements",
        "level": 3
      },
      {
        "id": "api/commands/request#assertions",
        "text": "Assertions",
        "level": 3
      },
      {
        "id": "api/commands/request#timeouts",
        "text": "Timeouts",
        "level": 3
      },
      {
        "id": "api/commands/request#command-log",
        "text": "Command Log",
        "level": 2
      },
      {
        "id": "api/commands/request#history",
        "text": "History",
        "level": 2
      },
      {
        "id": "api/commands/request#see-also",
        "text": "See also",
        "level": 2
      }
    ]
  },
  "content": {
    "type": "root",
    "children": [
      {
        "type": "heading",
        "depth": 1,
        "children": [
          {
            "type": "text",
            "value": "request"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Send an HTTP request from your test. You can use `cy.request()` to seed data before a test, log in without going through the login page, or test API endpoints directly. The Cypress server sends the request from Node.js rather than the browser, so CORS doesn't apply, and it shares cookies with the browser. See "
          },
          {
            "type": "link",
            "title": null,
            "url": "#How-cyrequest-sends-a-request",
            "children": [
              {
                "type": "text",
                "value": "How `cy.request()` sends a request"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Syntax"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request(url)\ncy.request(url, body)\ncy.request(method, url)\ncy.request(method, url, body)\ncy.request(options)"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Usage"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Correct Usage"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('http://dev.local/seed')"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Arguments"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "url (String)"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The URL to make the request to."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "A relative URL resolves against the `cy.origin()` origin, your `baseUrl`, or the page you visited, in that order. See "
          },
          {
            "type": "link",
            "title": null,
            "url": "#How-cyrequest-resolves-a-relative-URL",
            "children": [
              {
                "type": "text",
                "value": "How `cy.request()` resolves a relative URL"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "body (String, Object, FormData, Blob)"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "A request `body` to be sent in the request. When `body` is a JavaScript object or boolean, Cypress automatically JSON-serializes it and sets the `Content-Type: application/json` request header, unless you set a `Content-Type` in `headers`. When `body` is a string, it is sent as-is with no automatic content-type. When `body` is a `FormData` instance, Cypress sends it as `multipart/form-data`, which is how you "
          },
          {
            "type": "link",
            "title": null,
            "url": "#Upload-a-file-with-multipartform-data",
            "children": [
              {
                "type": "text",
                "value": "upload a file"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "method (String)"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Make a request using a specific method. If no method is defined, Cypress uses the `GET` method by default."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Cypress accepts these methods:"
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Group"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Methods"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Standard HTTP"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`, `TRACE`, `CONNECT`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "WebDAV"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`CHECKOUT`, `COPY`, `LOCK`, `MERGE`, `MKACTIVITY`, `MKCOL`, `MOVE`, `PROPFIND`, `PROPPATCH`, `REPORT`, `SEARCH`, `UNLOCK`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Other extensions"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`QUERY`, `PURGE`, `M-SEARCH`, `NOTIFY`, `SUBSCRIBE`, `UNSUBSCRIBE`"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "options (Object)"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Pass in an options object to change the default behavior of `cy.request()`."
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Option"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Default"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Description"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`log`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Displays the command in the "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/open-mode.md#Command-Log",
                    "children": [
                      {
                        "type": "text",
                        "value": "Command log"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`url`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`null`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "The URL to make the request to"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`method`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`GET`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "The HTTP method to use in the request"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`auth`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`null`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Adds an `Authorization` header for "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Authenticate-with-HTTP-Basic-or-a-bearer-token",
                    "children": [
                      {
                        "type": "text",
                        "value": "HTTP Basic Authentication"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": ", or a bearer token with `bearer`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`body`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`null`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Body to send along with the request"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`failOnStatusCode`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to fail on response codes other than `2xx` and `3xx`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`followRedirect`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to automatically follow redirects"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`form`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`false`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to convert the `body` values to URL encoded content and set the `x-www-form-urlencoded` header"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`encoding`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`utf8`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "The encoding to be used when serializing the response body. The following encodings are supported: `ascii`, `base64`, `binary`, `hex`, `latin1`, `utf8`, `utf-8`, `ucs2`, `ucs-2`, `utf16le`, `utf-16le`. A value that isn't a Node.js `Buffer` encoding, such as `false` or an empty string, fails."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`gzip`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to accept the `gzip` encoding"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`headers`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`null`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Additional headers to send; accepts an object literal. Cypress also sends them on each redirect it follows, with the exceptions in "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#How-cyrequest-follows-redirects",
                    "children": [
                      {
                        "type": "text",
                        "value": "How `cy.request()` follows redirects"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": "."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`qs`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`null`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Query parameters to append to the `url` of the request"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`retryOnStatusCodeFailure`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`false`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Retry-a-request-that-fails-with-a-server-error",
                    "children": [
                      {
                        "type": "text",
                        "value": "retry a request"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " that fails with a status code error. Cypress retries up to 4 times when this is `true`. Requires `failOnStatusCode: true`; setting it with `failOnStatusCode: false` throws an error."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`retryOnNetworkFailure`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Whether to retry a request that fails with a transient network error, such as `ECONNREFUSED`, `ECONNRESET`, or `ENOTFOUND`. Cypress retries up to 4 times when this is `true`."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`timeout`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/configuration.md#Timeouts",
                    "children": [
                      {
                        "type": "text",
                        "value": "`responseTimeout`"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Time to wait for `cy.request()` to resolve before "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Timeouts",
                    "children": [
                      {
                        "type": "text",
                        "value": "timing out"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": ". See "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Give-a-slow-endpoint-more-time-with-timeout",
                    "children": [
                      {
                        "type": "text",
                        "value": "Give a slow endpoint more time"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": "."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Set `baseUrl`, which relative URLs resolve against, and `responseTimeout`, the default for `timeout`, globally in the "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/references/configuration.md",
            "children": [
              {
                "type": "text",
                "value": "Cypress configuration"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Yields"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`cy.request()` yields the `response` as an object literal containing these properties:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`status`: the response status code"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`statusText`: the status message, such as `OK` or `Found`"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`isOkStatusCode`: `true` when `status` is `2xx` or `3xx`"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`body`: the response body, parsed as described in "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "#Response-body-parsing",
                    "children": [
                      {
                        "type": "text",
                        "value": "Response body parsing"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`headers`: the response headers"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`duration`: how long the request took, in milliseconds"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`requestHeaders`: the headers Cypress sent with the request"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`allRequestResponses`: each request and response in the chain, including redirects"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`redirects`: each redirect Cypress followed, as `status: url` strings (only present when a redirect was followed)"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`redirectedToUrl`: the URL the response redirects to (only present with `followRedirect: false`)"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Examples"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "URL"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Make a `GET` request"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Call an endpoint before each test, such as one that seeds a database."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "beforeEach(() => {\n  cy.request('http://localhost:8080/db/seed')\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Check a page's HTML without visiting it"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Unlike "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/visit.md",
            "children": [
              {
                "type": "text",
                "value": "`cy.visit()`"
              }
            ]
          },
          {
            "type": "text",
            "value": ", which loads the page and all of its resources, requesting a page returns only its HTML. That makes it a quick way to check what the server renders."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('/admin').its('body').should('include', '<h1>Admin</h1>')"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Method and URL"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Send a `DELETE` request"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('DELETE', 'http://localhost:8080/users/827')"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Alias the request using "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/as.md",
            "children": [
              {
                "type": "text",
                "value": ".as()"
              }
            ]
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('https://jsonplaceholder.cypress.io/comments').as('comments')\n\ncy.get('@comments').should((response) => {\n  expect(response.body).to.have.length(500)\n  expect(response).to.have.property('headers')\n  expect(response).to.have.property('duration')\n})"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Method, URL, and Body"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Send a `POST` request with a JSON body"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('POST', 'http://localhost:8080/users/admin', { name: 'Jane' }).then(\n  (response) => {\n    // response.body is automatically parsed from JSON when the server responds\n    // with a Content-Type ending in \"json\" (e.g. application/json)\n    expect(response.body).to.have.property('name', 'Jane') // true\n  }\n)"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Authentication"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Authenticate with HTTP Basic or a bearer token"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To send a request to an endpoint protected by "
          },
          {
            "type": "link",
            "title": null,
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication",
            "children": [
              {
                "type": "text",
                "value": "HTTP Basic Authentication"
              }
            ]
          },
          {
            "type": "text",
            "value": ", provide the credentials with the `auth` option. Cypress base64-encodes them and attaches an `Authorization` header to the request."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Read credentials with "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/env.md",
            "children": [
              {
                "type": "text",
                "value": "`cy.env()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " rather than writing them into the test, so they stay out of your spec files. The examples on this page read `username`, `password`, and `apiToken`, which you set as described in "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/guides/environment-variables.md",
            "children": [
              {
                "type": "text",
                "value": "Environment Variables & Secrets"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.env(['username', 'password']).then(({ username, password }) => {\n  cy.request({\n    method: 'POST',\n    url: '/api/query',\n    auth: {\n      username,\n      password,\n    },\n    body: {\n      cpId: 709916,\n    },\n  })\n})"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The `auth` option also accepts `user`/`pass` as aliases for `username`/`password`. To send a bearer token instead, pass it as `bearer`, and Cypress sends `Authorization: Bearer <token>`."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.env(['apiToken']).then(({ apiToken }) => {\n  cy.request({\n    url: '/api/profile',\n    auth: {\n      bearer: apiToken,\n    },\n  })\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Log in with an HTML form using `form: true`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Once a test covers your login page, other tests don't need to go through it. Submitting the login form with `cy.request()` skips loading the page and its resources, and the session cookie your server sets lands in the browser, the same as a real form submission. For more approaches, see the "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/references/recipes.md#Logging-In",
            "children": [
              {
                "type": "text",
                "value": "logging in recipes"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.env(['username', 'password']).then(({ username, password }) => {\n  cy.request({\n    method: 'POST',\n    url: '/login_with_form', // baseUrl is prepended to the URL\n    form: true, // sends the body URL-encoded with Content-Type: application/x-www-form-urlencoded\n    body: {\n      username,\n      password,\n    },\n    log: false, // keeps the credentials out of the Command Log\n  })\n})\n\n// to prove we have a session\ncy.getCookie('cypress-session-cookie').should('exist')"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Log in through the API and cache it with `cy.session()`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Logging in with `cy.request()` skips the login page, and wrapping it in "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/session.md",
            "children": [
              {
                "type": "text",
                "value": "`cy.session()`"
              }
            ]
          },
          {
            "type": "text",
            "value": " runs the login once and restores the session cookie in later tests. The `validate` function checks that the cached session still works before each test reuses it."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "beforeEach(() => {\n  cy.session(\n    'api-login',\n    () => {\n      cy.env(['username', 'password']).then(({ username, password }) => {\n        cy.request({\n          method: 'POST',\n          url: '/api/login',\n          body: { username, password },\n          log: false,\n        }).then((response) => {\n          expect(response.status, 'login status').to.eq(200)\n        })\n      })\n    },\n    {\n      validate() {\n        cy.request('/api/me').its('status').should('eq', 200)\n      },\n    }\n  )\n})\n\nit('shows the dashboard to a logged-in user', () => {\n  cy.visit('/dashboard')\n  cy.contains('h1', 'Dashboard')\n})"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Redirects, errors, and retries"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Request a page without following redirects"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To test where a page redirects, such as a dashboard that sends a logged-out user away, set `followRedirect: false`. The response then has the redirect's `status`, and `redirectedToUrl` holds the absolute URL the browser would go to next."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: '/dashboard',\n  followRedirect: false, // turn off following redirects\n}).then((response) => {\n  // redirect status code is 302\n  expect(response.status).to.eq(302)\n  expect(response.redirectedToUrl).to.eq('http://localhost:8080/unauthorized')\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Check every redirect `cy.request()` followed"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "When Cypress follows redirects, `response.redirects` lists each hop as the status code and the absolute URL it redirected to. Use it to confirm that an old route lands on the right page, and with the right status code."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('/old-dashboard').then((response) => {\n  expect(response.redirects).to.deep.eq([\n    '301: http://localhost:8080/dashboard',\n  ])\n  expect(response.status).to.eq(200)\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Test an error response with `failOnStatusCode: false`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "By default, a status code other than `2xx` or `3xx` fails the test. Set `failOnStatusCode: false` to get the response back instead, so you can assert on the status code and the error your API returns."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: '/api/users/999',\n  failOnStatusCode: false,\n}).then((response) => {\n  expect(response.status).to.eq(404)\n  expect(response.body).to.have.property('error', 'User not found')\n})"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The Command Log marks the `404` with a red indicator, and the test still passes because the assertions match:"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Retry a request that fails with a server error"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "A service that's still starting up can answer with a `503` for a moment. With `retryOnStatusCodeFailure: true`, Cypress retries a request that comes back with a status code other than `2xx` or `3xx`, up to 4 times, before it fails the test."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: '/api/status',\n  retryOnStatusCodeFailure: true,\n})\n  .its('status')\n  .should('eq', 200)"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Give a slow endpoint more time with `timeout`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`timeout` overrides "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/references/configuration.md#Timeouts",
            "children": [
              {
                "type": "text",
                "value": "`responseTimeout`"
              }
            ]
          },
          {
            "type": "text",
            "value": " for one request, so a slow endpoint doesn't need a longer timeout for every request in your suite."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: '/api/reports/monthly',\n  timeout: 60000, // wait up to 60 seconds for this request only\n})"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Files"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Download a PDF file"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "With `encoding: 'binary'`, `response.body` holds the file's binary content, which you can save with "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/writefile.md",
            "children": [
              {
                "type": "text",
                "value": "`cy.writeFile()`"
              }
            ]
          },
          {
            "type": "text",
            "value": ". This works for other file types too, such as `.zip` or `.doc` files."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: 'http://localhost:8080/some-document.pdf',\n  encoding: 'binary',\n}).then((response) => {\n  cy.writeFile('path/to/save/document.pdf', response.body, 'binary')\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Get the data URL of an image"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "With `encoding: 'base64'`, `response.body` holds the image's base64-encoded content, which you can use to build a "
          },
          {
            "type": "link",
            "title": null,
            "url": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs",
            "children": [
              {
                "type": "text",
                "value": "Data URI"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: 'https://docs.cypress.io/img/logo/cypress-logo-circle-dark.png',\n  encoding: 'base64',\n}).then((response) => {\n  const base64Content = response.body\n  const mime = response.headers['content-type'] // or 'image/png'\n  // see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n  const imageDataUrl = `data:${mime};base64,${base64Content}`\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Upload a file with `multipart/form-data`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To upload a file, build a "
          },
          {
            "type": "link",
            "title": null,
            "url": "https://developer.mozilla.org/en-US/docs/Web/API/FormData",
            "children": [
              {
                "type": "text",
                "value": "`FormData`"
              }
            ]
          },
          {
            "type": "text",
            "value": " object and pass it as the `body`. Cypress encodes each field, sends the file's bytes unchanged, and sets the `Content-Type: multipart/form-data` header with the boundary the server needs to parse the parts. Leave `form` unset, since it applies to URL-encoded forms only."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "This is the `cy.request()` equivalent of `curl -F file=@image.png`:"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.env(['apiToken']).then(({ apiToken }) => {\n  // image fixtures are read as base64 by default\n  cy.fixture('image.png').then((image) => {\n    const formData = new FormData()\n\n    formData.append(\n      'file',\n      Cypress.Blob.base64StringToBlob(image, 'image/png'),\n      'image.png'\n    )\n\n    cy.request({\n      method: 'POST',\n      url: '/api/action/upload_file',\n      headers: {\n        Authorization: `Bearer ${apiToken}`,\n      },\n      body: formData,\n    })\n      .its('status')\n      .should('eq', 200)\n  })\n})"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The third argument to `formData.append()` sets the filename the server receives. Without it, the part is sent with the filename `blob`. Plain string fields go in the same object, such as `formData.append('description', 'Avatar')`."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The response to a `FormData` request arrives as raw bytes, even when it is JSON. See "
          },
          {
            "type": "link",
            "title": null,
            "url": "#Response-body-parsing",
            "children": [
              {
                "type": "text",
                "value": "Response body parsing"
              }
            ]
          },
          {
            "type": "text",
            "value": " to read it."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "API testing workflows with `cy.request()`"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Send query parameters with `qs`"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The `qs` option builds the query string for you. Cypress merges it with any query string already in the `url`, rather than replacing it."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request({\n  url: '/api/users?active=true',\n  qs: { page: 2, limit: 10 },\n})\n// requests /api/users?active=true&page=2&limit=10"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Create a record, then use its ID in later requests"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Seed the data a test needs, then use what the API returns. Here the `id` from the `POST` response drives the `GET` and the `DELETE` that cleans up."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('POST', '/api/users', { name: 'Jane' })\n  .its('body.id')\n  .then((id) => {\n    cy.request(`/api/users/${id}`).its('body.name').should('eq', 'Jane')\n    cy.request('DELETE', `/api/users/${id}`).its('status').should('eq', 204)\n  })"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Assert on the status, headers, and response time"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Every response carries its `status`, its `headers`, and the `duration` of the request in milliseconds, so one request can check all three."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('/api/users').then((response) => {\n  expect(response.status).to.eq(200)\n  expect(response.headers['content-type']).to.include('application/json')\n  expect(response.duration).to.be.lessThan(500)\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Type the response body in TypeScript"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`cy.request()` takes a type argument for the response body, so `response.body` is typed in your editor instead of `any`."
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "JavaScript"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "TypeScript"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('/api/users/1').then((response) => {\n  expect(response.body.name).to.eq('Jane')\n})"
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "interface User {\n  id: number\n  name: string\n}\n\ncy.request<User>('/api/users/1').then((response) => {\n  expect(response.body.name).to.eq('Jane')\n})"
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Poll an endpoint until a job finishes"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "To wait for work the server does in the background, call `cy.request()` from a function that calls itself until the response shows the job is done. The `attempts` count stops the loop, so a job that never finishes fails the test rather than polling forever."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "function waitForJob(id, attempts = 10) {\n  if (attempts === 0) {\n    throw new Error(`Job ${id} did not finish`)\n  }\n\n  cy.request(`/api/jobs/${id}`).then(({ body }) => {\n    if (body.status !== 'done') {\n      cy.wait(500)\n      waitForJob(id, attempts - 1)\n    }\n  })\n}\n\ncy.request('POST', '/api/jobs', { type: 'export' })\n  .its('body.id')\n  .then((id) => {\n    waitForJob(id)\n  })"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "For a version that yields the finished job so you can assert on it, see "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/app/guides/api-testing.md#Poll-an-asynchronous-job",
            "children": [
              {
                "type": "text",
                "value": "Poll an asynchronous job"
              }
            ]
          },
          {
            "type": "text",
            "value": "."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Notes"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "How `cy.request()` sends a request"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`cy.request()` doesn't send the request from the browser. Your test hands it to the Cypress server, which runs in Node.js and sends it to your server directly. Along the way, the Cypress server reads the browser's cookies for the URL and saves any `Set-Cookie` headers it gets back into the browser."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Because the request doesn't go through the browser:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "It doesn't appear in the browser's DevTools Network tab."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "CORS doesn't apply, so you can request any server, whatever its CORS headers."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/intercept.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.intercept()`"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " routes don't match it. It always reaches your real server, which is what you want when you test an endpoint without starting your front end."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Cypress doesn't verify the server's TLS certificate, so a self-signed or expired certificate doesn't fail the request. It also means `cy.request()` doesn't catch a certificate problem."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "It sends the browser's `User-Agent` unless you set one in `headers`. To change the browser's own user agent, see "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/faq.md#Can-I-override-or-change-the-default-user-agent-the-browser-uses",
                    "children": [
                      {
                        "type": "text",
                        "value": "how to override the browser's default user agent"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": "."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "For example:"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "// docs.cypress.io sends no CORS headers, and cy.request() still succeeds\ncy.request('https://docs.cypress.io').its('status').should('eq', 200)"
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "How `cy.request()` resolves a relative URL"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "When you pass a URL without a protocol and host, such as `/api/users`, Cypress resolves the host for `cy.request()` in this order:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": true,
        "start": 1,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Inside a "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/origin.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.origin()`"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": " callback, Cypress uses the origin you passed to `cy.origin()`."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "If the `baseUrl` property is set in your "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/configuration.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "configuration file"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": ", Cypress prefixes the URL with it. This applies whether or not you have visited a page, so `baseUrl` wins over the origin of a page you visited."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "cypress.config.js"
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "cypress.config.ts"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "const { defineConfig } = require('cypress')\n\nmodule.exports = defineConfig({\n  e2e: {\n    baseUrl: 'http://localhost:1234',\n  },\n})"
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "import { defineConfig } from 'cypress'\n\nexport default defineConfig({\n  e2e: {\n    baseUrl: 'http://localhost:1234',\n  },\n})"
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('seed/admin') // URL is http://localhost:1234/seed/admin"
      },
      {
        "type": "list",
        "ordered": true,
        "start": 1,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "If no `baseUrl` is set and you have visited a page, Cypress uses the origin of the URL used for the `cy.visit()`."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.visit('http://localhost:8080/app')\ncy.request('users/1.json') //  URL is  http://localhost:8080/users/1.json"
      },
      {
        "type": "list",
        "ordered": true,
        "start": 1,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "If Cypress cannot determine the host, it throws an error."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "How `cy.request()` sends and stores cookies"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Before it sends a request, Cypress attaches the cookies the browser would have sent to that URL. When the response has `Set-Cookie` headers, Cypress sets those cookies in the browser, so later requests and page visits use them."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Cookies are pulled from the cookie jar by domain match. A cookie set without `hostOnly: true` is a domain cookie, so it can be attached to a `cy.request()` aimed at a different host that domain-matches it (for example a sibling subdomain on the same registrable domain). If a cookie shows up on a request unexpectedly, see "
          },
          {
            "type": "link",
            "title": null,
            "url": "/llm/markdown/api/commands/setcookie.md#Cookie-scope-host-only-vs-domain-cookies",
            "children": [
              {
                "type": "text",
                "value": "Cookie scope (host-only vs. domain cookies)"
              }
            ]
          },
          {
            "type": "text",
            "value": " for how to scope it to a single exact host with `hostOnly: true`."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "How `cy.request()` follows redirects"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "With `followRedirect: true`, the default, Cypress follows each redirect and sends your `headers` again. Keep these behaviors in mind:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "Cookies carry across. Cypress saves any `Set-Cookie` headers into the browser, then attaches the cookies that match the next URL."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`Authorization` is dropped when the redirect changes the hostname."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "A redirected `POST`, `PUT`, or `DELETE` is followed as a `GET`, without its body or `Content-Type`. Only a `307` keeps the method and body."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "How `cy.request()` handles request and response bodies"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Request body serialization"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "What Cypress sends, and what you get back in `response.body`, depends on the type of `body`:"
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`body`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`Content-Type` Cypress sets"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`response.body`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Object or boolean"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`application/json`, unless you set one"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Parsed whenever it is valid JSON, whatever the response's `Content-Type`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Object with `form: true`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`application/x-www-form-urlencoded`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Parsed when the response's `Content-Type` ends in `json`, otherwise a string"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "String"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "None"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Parsed when the response's `Content-Type` ends in `json`, otherwise a string"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`FormData`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`multipart/form-data` with a boundary, replacing one you set"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "An `ArrayBuffer` of the raw bytes, whatever the response's `Content-Type`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "`Blob`"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "None"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "An `ArrayBuffer` of the raw bytes, whatever the response's `Content-Type`"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "None"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "None"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Parsed when the response's `Content-Type` ends in `json`, otherwise a string"
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "For a string or `Blob` body, set a `Content-Type` in `headers` if your server expects one."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "A `FormData` body needs no `Content-Type` of its own. Cypress encodes each field as a part of a `multipart/form-data` body, and a `File` or `Blob` field keeps its filename and type, defaulting to `application/octet-stream` when it has no type. The boundary that separates the parts goes in the `Content-Type` header Cypress sets, replacing any you pass in `headers`."
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "Don't combine a `FormData` body with `form: true` or an `application/x-www-form-urlencoded` header. Either one sends the body down the URL-encoded form path, and the request fails with a network-level error."
          }
        ]
      },
      {
        "type": "heading",
        "depth": 4,
        "children": [
          {
            "type": "text",
            "value": "Response body parsing"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "`response.body` is parsed into an object when either:"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "The response's `Content-Type` ends in `json`, such as `application/json`."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "The request `body` is an object or boolean (without `form: true`), and the response is valid JSON."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "After a `FormData` or `Blob` request, `response.body` is an `ArrayBuffer` of raw bytes, even for JSON, so decode it before you assert on it. In every other case, it is a string."
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "const formData = new FormData()\nformData.append('name', 'Jane')\n\ncy.request({ method: 'POST', url: '/api/users', body: formData }).then(\n  (response) => {\n    const user = JSON.parse(new TextDecoder().decode(response.body))\n    expect(user).to.have.property('name', 'Jane')\n  }\n)"
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Rules"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Requirements"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`cy.request()` requires being chained off of `cy`."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`cy.request()` requires that the server sends a response."
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`cy.request()` requires that the response status code be `2xx` or `3xx` when `failOnStatusCode` is `true`."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Assertions"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`cy.request()` will only run assertions you have chained once, and will not "
                  },
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/core-concepts/retry-ability.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "retry"
                      }
                    ]
                  },
                  {
                    "type": "text",
                    "value": "."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 3,
        "children": [
          {
            "type": "text",
            "value": "Timeouts"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "text",
                    "value": "`cy.request()` can time out waiting for the server to respond."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "Command Log"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "This example requests the comments endpoint and tests the response:"
          }
        ]
      },
      {
        "type": "code",
        "lang": null,
        "meta": null,
        "value": "cy.request('https://jsonplaceholder.cypress.io/comments').then((response) => {\n  expect(response.status).to.eq(200)\n  expect(response.body).to.have.length(500)\n  expect(response).to.have.property('headers')\n  expect(response).to.have.property('duration')\n})"
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "The commands above display in the Command Log as a `request` row with the method, status, and URL, followed by one row per assertion:"
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "type": "text",
            "value": "When you click `request` in the Command Log, the console shows the request Cypress sent and the response it got under `Request:`, and the yielded response under `Yielded:`:"
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "History"
          }
        ]
      },
      {
        "type": "table",
        "align": [
          null,
          null
        ],
        "children": [
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Version"
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Changes"
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#16-2-1",
                    "children": [
                      {
                        "type": "text",
                        "value": "16.2.1"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Fails with an invalid encoding error when `encoding` is `false`, `0`, or an empty string."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#15-20-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "15.20.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Added support for `QUERY` method."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#7-4-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "7.4.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Added support for `FormData` and `Blob` request bodies."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#4-7-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "4.7.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Added support for `encoding` option."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#3-3-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "3.3.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Added support for options `retryOnStatusCodeFailure` and `retryOnNetworkFailure`."
                  }
                ]
              }
            ]
          },
          {
            "type": "tableRow",
            "children": [
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/changelog.md#3-2-0",
                    "children": [
                      {
                        "type": "text",
                        "value": "3.2.0"
                      }
                    ]
                  }
                ]
              },
              {
                "type": "tableCell",
                "children": [
                  {
                    "type": "text",
                    "value": "Added support for any valid HTTP `method` argument including `TRACE`, `COPY`, `LOCK`, `MKCOL`, `MOVE`, `PURGE`, `PROPFIND`, `PROPPATCH`, `UNLOCK`, `REPORT`, `MKACTIVITY`, `CHECKOUT`, `MERGE`, `M-SEARCH`, `NOTIFY`, `SUBSCRIBE`, `UNSUBSCRIBE`, `SEARCH`, and `CONNECT`."
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "heading",
        "depth": 2,
        "children": [
          {
            "type": "text",
            "value": "See also"
          }
        ]
      },
      {
        "type": "list",
        "ordered": false,
        "start": null,
        "spread": false,
        "children": [
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/guides/api-testing.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "API Testing"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/session.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.session()`"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/intercept.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.intercept()`"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/env.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.env()`"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/api/commands/visit.md",
                    "children": [
                      {
                        "type": "text",
                        "value": "`cy.visit()`"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "listItem",
            "spread": false,
            "checked": null,
            "children": [
              {
                "type": "paragraph",
                "children": [
                  {
                    "type": "link",
                    "title": null,
                    "url": "/llm/markdown/app/references/recipes.md#Logging-In",
                    "children": [
                      {
                        "type": "text",
                        "value": "Recipes: Logging In"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "token_estimate": 4508
}