{
  "doc": {
    "id": "api/commands/request",
    "title": "cy.request()",
    "description": "Make an HTTP request in Cypress.",
    "section": "api",
    "source_path": "/llm/markdown/api/commands/request.md",
    "version": "fbc9225067c51c52ee13224e3b702cf8a025ec12",
    "updated_at": "2026-08-14T12:36:26.878Z",
    "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#issue-an-http-request",
        "text": "Issue an HTTP request",
        "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#options",
        "text": "Options",
        "level": 3
      },
      {
        "id": "api/commands/request#request-a-page-while-disabling-auto-redirect",
        "text": "Request a page while disabling auto redirect",
        "level": 4
      },
      {
        "id": "api/commands/request#http-basic-authentication",
        "text": "HTTP Basic Authentication",
        "level": 4
      },
      {
        "id": "api/commands/request#download-a-pdf-file",
        "text": "Download a PDF file",
        "level": 4
      },
      {
        "id": "api/commands/request#get-data-url-of-an-image",
        "text": "Get Data URL of an image",
        "level": 4
      },
      {
        "id": "api/commands/request#html-form-submissions-using-form-option",
        "text": "HTML form submissions using form option",
        "level": 4
      },
      {
        "id": "api/commands/request#using-cy-request-for-html-forms",
        "text": "Using cy.request() for HTML Forms",
        "level": 4
      },
      {
        "id": "api/commands/request#request-polling",
        "text": "Request Polling",
        "level": 3
      },
      {
        "id": "api/commands/request#call-cy-request-over-and-over-again",
        "text": "Call cy.request() over and over again",
        "level": 4
      },
      {
        "id": "api/commands/request#notes",
        "text": "Notes",
        "level": 2
      },
      {
        "id": "api/commands/request#json-request-and-response-bodies",
        "text": "JSON 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#debugging",
        "text": "Debugging",
        "level": 3
      },
      {
        "id": "api/commands/request#request-is-not-displayed-in-the-network-tab-of-developer-tools",
        "text": "Request is not displayed in the Network Tab of Developer Tools",
        "level": 4
      },
      {
        "id": "api/commands/request#cors",
        "text": "CORS",
        "level": 3
      },
      {
        "id": "api/commands/request#cors-is-bypassed",
        "text": "CORS is bypassed",
        "level": 4
      },
      {
        "id": "api/commands/request#cookies",
        "text": "Cookies",
        "level": 3
      },
      {
        "id": "api/commands/request#cookies-are-automatically-sent-and-received",
        "text": "Cookies are automatically sent and received",
        "level": 4
      },
      {
        "id": "api/commands/request#cy-intercept",
        "text": "cy.intercept()",
        "level": 3
      },
      {
        "id": "api/commands/request#cy-request-sends-requests-to-actual-endpoints-bypassing-those-defined-using-cy-intercept",
        "text": "cy.request() sends requests to actual endpoints, bypassing those defined using cy.intercept()",
        "level": 4
      },
      {
        "id": "api/commands/request#user-agent",
        "text": "User agent",
        "level": 3
      },
      {
        "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
      }
    ]
  },
  "chunks": [
    {
      "id": "api/commands/request#syntax",
      "doc_id": "api/commands/request",
      "heading": "Syntax",
      "heading_level": 2,
      "content_markdown": "## Syntax\n\n```\ncy.request(url)cy.request(url, body)cy.request(method, url)cy.request(method, url, body)cy.request(options)\n```\n\n### Usage\n\n**Correct Usage**\n\n```\ncy.request('http://dev.local/seed')\n```\n\n### Arguments\n\n**url _(String)_**\n\nThe URL to make the request to.\n\nIf you do not provide a fully qualified domain name (FQDN) URL, Cypress will make its best guess as to which host you want `cy.request()` to use in the URL.\n\n1.  If you make a `cy.request()` after visiting a page, Cypress assumes the URL used for the `cy.visit()` is the host.\n\n```\ncy.visit('http://localhost:8080/app')cy.request('users/1.json') //  URL is  http://localhost:8080/users/1.json\n```\n\n1.  If you make a `cy.request()` prior to visiting a page, Cypress assumes the host is the `baseUrl` property configured inside of of your [configuration file](/llm/markdown/app/references/configuration.md).\n\n*   cypress.config.js\n*   cypress.config.ts\n\n```\nconst { defineConfig } = require('cypress')module.exports = defineConfig({  e2e: {    baseUrl: 'http://localhost:1234',  },})\n```\n\n```\nimport { defineConfig } from 'cypress'export default defineConfig({  e2e: {    baseUrl: 'http://localhost:1234',  },})\n```\n\n```\ncy.request('seed/admin') // URL is http://localhost:1234/seed/admin\n```\n\n1.  If Cypress cannot determine the host it will throw an error.\n\n**body _(String, Object)_**\n\nA 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. When `body` is a string, it is sent as-is with no automatic content-type.\n\n**method _(String)_**\n\nMake a request using a specific method. If no method is defined, Cypress uses the `GET` method by default.\n\nSupported methods include:\n\n*   `GET`\n*   `POST`\n*   `PUT`\n*   `DELETE`\n*   `PATCH`\n*   `HEAD`\n*   `OPTIONS`\n*   `TRACE`\n*   `COPY`\n*   `QUERY`\n*   `LOCK`\n*   `MKCOL`\n*   `MOVE`\n*   `PURGE`\n*   `PROPFIND`\n*   `PROPPATCH`\n*   `UNLOCK`\n*   `REPORT`\n*   `MKACTIVITY`\n*   `CHECKOUT`\n*   `MERGE`\n*   `M-SEARCH`\n*   `NOTIFY`\n*   `SUBSCRIBE`\n*   `UNSUBSCRIBE`\n*   `SEARCH`\n*   `CONNECT`\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `cy.request()`.\n\nYou can also set options for `cy.request()`'s `baseUrl` and `responseTimeout` globally in [configuration](/llm/markdown/app/references/configuration.md).\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `url` | `null` | The URL to make the request to |\n| `method` | `GET` | The HTTP method to use in the request |\n| `auth` | `null` | Adds Authorization headers for [HTTP Basic Authentication](#HTTP-Basic-Authentication). |\n| `body` | `null` | Body to send along with the request |\n| `failOnStatusCode` | `true` | Whether to fail on response codes other than `2xx` and `3xx` |\n| `followRedirect` | `true` | Whether to automatically follow redirects |\n| `form` | `false` | Whether to convert the `body` values to URL encoded content and set the `x-www-form-urlencoded` header |\n| `encoding` | `utf8` | 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` |\n| `gzip` | `true` | Whether to accept the `gzip` encoding |\n| `headers` | `null` | Additional headers to send; Accepts object literal. _Note:_ `headers` will only be sent for the initial request for `cy.request()`, not for any subsequent requests. |\n| `qs` | `null` | Query parameters to append to the `url` of the request |\n| `retryOnStatusCodeFailure` | `false` | Whether Cypress should automatically retry status code errors under the hood. Cypress will retry a request up to 4 times if this is set to true. |\n| `retryOnNetworkFailure` | `true` | Whether Cypress should automatically retry transient network errors under the hood. Cypress will retry a request up to 4 times if this is set to true. |\n| `timeout` | [`responseTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `cy.request()` to resolve before [timing out](#Timeouts) |\n\nYou can also set options for `cy.request()`'s `baseUrl` and `responseTimeout` globally in the [Cypress configuration](/llm/markdown/app/references/configuration.md).\n\n### Yields\n\n`cy.request()` yields the `response` as an object literal containing properties such as:\n\n*   `status`\n*   `body`\n*   `headers`\n*   `duration`\n\nThe `response.body` is automatically parsed as a JavaScript object when the response has a `Content-Type` header whose value ends in `json` (such as `application/json` or `application/vnd.api+json`). Otherwise, `response.body` is a string.\n",
      "section": "api",
      "anchors": [
        "syntax"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 907
    },
    {
      "id": "api/commands/request#arguments",
      "doc_id": "api/commands/request",
      "heading": "Arguments",
      "heading_level": 3,
      "content_markdown": "### Arguments\n\n**url _(String)_**\n\nThe URL to make the request to.\n\nIf you do not provide a fully qualified domain name (FQDN) URL, Cypress will make its best guess as to which host you want `cy.request()` to use in the URL.\n\n1.  If you make a `cy.request()` after visiting a page, Cypress assumes the URL used for the `cy.visit()` is the host.\n\n```\ncy.visit('http://localhost:8080/app')cy.request('users/1.json') //  URL is  http://localhost:8080/users/1.json\n```\n\n1.  If you make a `cy.request()` prior to visiting a page, Cypress assumes the host is the `baseUrl` property configured inside of of your [configuration file](/llm/markdown/app/references/configuration.md).\n\n*   cypress.config.js\n*   cypress.config.ts\n\n```\nconst { defineConfig } = require('cypress')module.exports = defineConfig({  e2e: {    baseUrl: 'http://localhost:1234',  },})\n```\n\n```\nimport { defineConfig } from 'cypress'export default defineConfig({  e2e: {    baseUrl: 'http://localhost:1234',  },})\n```\n\n```\ncy.request('seed/admin') // URL is http://localhost:1234/seed/admin\n```\n\n1.  If Cypress cannot determine the host it will throw an error.\n\n**body _(String, Object)_**\n\nA 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. When `body` is a string, it is sent as-is with no automatic content-type.\n\n**method _(String)_**\n\nMake a request using a specific method. If no method is defined, Cypress uses the `GET` method by default.\n\nSupported methods include:\n\n*   `GET`\n*   `POST`\n*   `PUT`\n*   `DELETE`\n*   `PATCH`\n*   `HEAD`\n*   `OPTIONS`\n*   `TRACE`\n*   `COPY`\n*   `QUERY`\n*   `LOCK`\n*   `MKCOL`\n*   `MOVE`\n*   `PURGE`\n*   `PROPFIND`\n*   `PROPPATCH`\n*   `UNLOCK`\n*   `REPORT`\n*   `MKACTIVITY`\n*   `CHECKOUT`\n*   `MERGE`\n*   `M-SEARCH`\n*   `NOTIFY`\n*   `SUBSCRIBE`\n*   `UNSUBSCRIBE`\n*   `SEARCH`\n*   `CONNECT`\n\n**options _(Object)_**\n\nPass in an options object to change the default behavior of `cy.request()`.\n\nYou can also set options for `cy.request()`'s `baseUrl` and `responseTimeout` globally in [configuration](/llm/markdown/app/references/configuration.md).\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `log` | `true` | Displays the command in the [Command log](/llm/markdown/app/core-concepts/open-mode.md#Command-Log) |\n| `url` | `null` | The URL to make the request to |\n| `method` | `GET` | The HTTP method to use in the request |\n| `auth` | `null` | Adds Authorization headers for [HTTP Basic Authentication](#HTTP-Basic-Authentication). |\n| `body` | `null` | Body to send along with the request |\n| `failOnStatusCode` | `true` | Whether to fail on response codes other than `2xx` and `3xx` |\n| `followRedirect` | `true` | Whether to automatically follow redirects |\n| `form` | `false` | Whether to convert the `body` values to URL encoded content and set the `x-www-form-urlencoded` header |\n| `encoding` | `utf8` | 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` |\n| `gzip` | `true` | Whether to accept the `gzip` encoding |\n| `headers` | `null` | Additional headers to send; Accepts object literal. _Note:_ `headers` will only be sent for the initial request for `cy.request()`, not for any subsequent requests. |\n| `qs` | `null` | Query parameters to append to the `url` of the request |\n| `retryOnStatusCodeFailure` | `false` | Whether Cypress should automatically retry status code errors under the hood. Cypress will retry a request up to 4 times if this is set to true. |\n| `retryOnNetworkFailure` | `true` | Whether Cypress should automatically retry transient network errors under the hood. Cypress will retry a request up to 4 times if this is set to true. |\n| `timeout` | [`responseTimeout`](/llm/markdown/app/references/configuration.md#Timeouts) | Time to wait for `cy.request()` to resolve before [timing out](#Timeouts) |\n\nYou can also set options for `cy.request()`'s `baseUrl` and `responseTimeout` globally in the [Cypress configuration](/llm/markdown/app/references/configuration.md).\n",
      "section": "api",
      "anchors": [
        "arguments"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 815
    },
    {
      "id": "api/commands/request#yields",
      "doc_id": "api/commands/request",
      "heading": "Yields",
      "heading_level": 3,
      "content_markdown": "### Yields\n\n`cy.request()` yields the `response` as an object literal containing properties such as:\n\n*   `status`\n*   `body`\n*   `headers`\n*   `duration`\n\nThe `response.body` is automatically parsed as a JavaScript object when the response has a `Content-Type` header whose value ends in `json` (such as `application/json` or `application/vnd.api+json`). Otherwise, `response.body` is a string.\n",
      "section": "api",
      "anchors": [
        "yields"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 71
    },
    {
      "id": "api/commands/request#examples",
      "doc_id": "api/commands/request",
      "heading": "Examples",
      "heading_level": 2,
      "content_markdown": "## Examples\n\n### URL\n\n#### Make a `GET` request\n\n`cy.request()` is great for talking to an external endpoint before your tests to seed a database.\n\n```\nbeforeEach(() => {  cy.request('http://localhost:8080/db/seed')})\n```\n\n#### Issue an HTTP request\n\nSometimes it's quicker to test the contents of a page rather than [`cy.visit()`](/llm/markdown/api/commands/visit.md) and wait for the entire page and all of its resources to load.\n\n```\ncy.request('/admin').its('body').should('include', '<h1>Admin</h1>')\n```\n\n### Method and URL\n\n#### Send a `DELETE` request\n\n```\ncy.request('DELETE', 'http://localhost:8888/users/827')\n```\n\n#### Alias the request using [.as()](/llm/markdown/api/commands/as.md)\n\n```\ncy.request('https://jsonplaceholder.cypress.io/comments').as('comments')cy.get('@comments').should((response) => {  expect(response.body).to.have.length(500)  expect(response).to.have.property('headers')  expect(response).to.have.property('duration')})\n```\n\n### Method, URL, and Body\n\n#### Send a `POST` request with a JSON body\n\n```\ncy.request('POST', 'http://localhost:8888/users/admin', { name: 'Jane' }).then(  (response) => {    // response.body is automatically parsed from JSON when the server responds    // with a Content-Type ending in \"json\" (e.g. application/json)    expect(response.body).to.have.property('name', 'Jane') // true  })\n```\n\n### Options\n\n#### Request a page while disabling auto redirect\n\nTo test the redirection behavior of a login without a session, `cy.request` can be used to check the `status` and `redirectedToUrl` property.\n\nThe `redirectedToUrl` property is a special Cypress property that normalizes the URL the browser would normally follow during a redirect.\n\n```\ncy.request({  url: '/dashboard',  followRedirect: false, // turn off following redirects}).then((resp) => {  // redirect status code is 302  expect(resp.status).to.eq(302)  expect(resp.redirectedToUrl).to.eq('http://localhost:8082/unauthorized')})\n```\n\n#### HTTP Basic Authentication\n\nTo send a request to an endpoint protected by [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), provide the credentials with the `auth` option. Cypress base64-encodes them and attaches an `Authorization` header to the request.\n\n```\ncy.request({  method: 'POST',  url: 'https://api.example.com/query',  auth: {    username: 'jane.lane',    password: 'password123',  },  body: {    cpId: 709916,  },})\n```\n\nThe `auth` option also accepts `user`/`pass` as aliases for `username`/`password`.\n\n#### Download a PDF file\n\nBy passing the `encoding: binary` option, the `response.body` will be serialized binary content of the file. You can use this to access various file types via `.request()` like `.pdf`, `.zip`, or `.doc` files.\n\n```\ncy.request({  url: 'http://localhost:8080/some-document.pdf',  encoding: 'binary',}).then((response) => {  cy.writeFile('path/to/save/document.pdf', response.body, 'binary')})\n```\n\n#### Get Data URL of an image\n\nBy passing the `encoding: base64` option, the `response.body` will be base64-encoded content of the image. You can use this to construct a [Data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) for use elsewhere.\n\n```\ncy.request({  url: 'https://docs.cypress.io/img/logo.png',  encoding: 'base64',}).then((response) => {  const base64Content = response.body  const mime = response.headers['content-type'] // or 'image/png'  // see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs  const imageDataUrl = `data:${mime};base64,${base64Content}`})\n```\n\n#### HTML form submissions using form option\n\nOftentimes, once you have a proper e2e test around logging in, there's no reason to continue to `cy.visit()` the login and wait for the entire page to load all associated resources before running any other commands. Doing so can slow down our entire test suite.\n\nUsing `cy.request()`, we can bypass all of this because it automatically gets and sets cookies as if the requests had come from the browser.\n\n```\ncy.request({  method: 'POST',  url: '/login_with_form', // baseUrl is prepend to URL  form: true, // indicates the body should be form urlencoded and sets Content-Type: application/x-www-form-urlencoded headers  body: {    username: 'jane.lane',    password: 'password123',  },})// to prove we have a sessioncy.getCookie('cypress-session-cookie').should('exist')\n```\n\n#### Using `cy.request()` for HTML Forms\n\n[Check out our example recipe using `cy.request()` for HTML web forms](/llm/markdown/app/references/recipes.md#Logging-In)\n\n### Request Polling\n\n#### Call `cy.request()` over and over again\n\nThis is useful when you're polling a server for a response that may take awhile to complete.\n\nAll we're really doing here is creating a recursive function. Nothing more complicated than that.\n\n```\n// a regular ol' function folksfunction req () {  cy    .request(...)    .then((resp) => {      // if we got what we wanted      if (resp.status === 200 && resp.body.ok === true)        // break out of the recursive loop        return      // else recurse      req()    })}cy  // do the thing causing the side effect  .get('button').click()  // now start the requests  .then(req)\n```\n",
      "section": "api",
      "anchors": [
        "examples"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 835
    },
    {
      "id": "api/commands/request#url",
      "doc_id": "api/commands/request",
      "heading": "URL",
      "heading_level": 3,
      "content_markdown": "### URL\n\n#### Make a `GET` request\n\n`cy.request()` is great for talking to an external endpoint before your tests to seed a database.\n\n```\nbeforeEach(() => {  cy.request('http://localhost:8080/db/seed')})\n```\n\n#### Issue an HTTP request\n\nSometimes it's quicker to test the contents of a page rather than [`cy.visit()`](/llm/markdown/api/commands/visit.md) and wait for the entire page and all of its resources to load.\n\n```\ncy.request('/admin').its('body').should('include', '<h1>Admin</h1>')\n```\n",
      "section": "api",
      "anchors": [
        "url"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 85
    },
    {
      "id": "api/commands/request#issue-an-http-request",
      "doc_id": "api/commands/request",
      "heading": "Issue an HTTP request",
      "heading_level": 4,
      "content_markdown": "#### Issue an HTTP request\n\nSometimes it's quicker to test the contents of a page rather than [`cy.visit()`](/llm/markdown/api/commands/visit.md) and wait for the entire page and all of its resources to load.\n\n```\ncy.request('/admin').its('body').should('include', '<h1>Admin</h1>')\n```\n",
      "section": "api",
      "anchors": [
        "issue-an-http-request"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 47
    },
    {
      "id": "api/commands/request#method-url-and-body",
      "doc_id": "api/commands/request",
      "heading": "Method, URL, and Body",
      "heading_level": 3,
      "content_markdown": "### Method, URL, and Body\n\n#### Send a `POST` request with a JSON body\n\n```\ncy.request('POST', 'http://localhost:8888/users/admin', { name: 'Jane' }).then(  (response) => {    // response.body is automatically parsed from JSON when the server responds    // with a Content-Type ending in \"json\" (e.g. application/json)    expect(response.body).to.have.property('name', 'Jane') // true  })\n```\n",
      "section": "api",
      "anchors": [
        "method-url-and-body"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 67
    },
    {
      "id": "api/commands/request#send-a-post-request-with-a-json-body",
      "doc_id": "api/commands/request",
      "heading": "Send a POST request with a JSON body",
      "heading_level": 4,
      "content_markdown": "#### Send a `POST` request with a JSON body\n\n```\ncy.request('POST', 'http://localhost:8888/users/admin', { name: 'Jane' }).then(  (response) => {    // response.body is automatically parsed from JSON when the server responds    // with a Content-Type ending in \"json\" (e.g. application/json)    expect(response.body).to.have.property('name', 'Jane') // true  })\n```\n",
      "section": "api",
      "anchors": [
        "send-a-post-request-with-a-json-body"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 60
    },
    {
      "id": "api/commands/request#options",
      "doc_id": "api/commands/request",
      "heading": "Options",
      "heading_level": 3,
      "content_markdown": "### Options\n\n#### Request a page while disabling auto redirect\n\nTo test the redirection behavior of a login without a session, `cy.request` can be used to check the `status` and `redirectedToUrl` property.\n\nThe `redirectedToUrl` property is a special Cypress property that normalizes the URL the browser would normally follow during a redirect.\n\n```\ncy.request({  url: '/dashboard',  followRedirect: false, // turn off following redirects}).then((resp) => {  // redirect status code is 302  expect(resp.status).to.eq(302)  expect(resp.redirectedToUrl).to.eq('http://localhost:8082/unauthorized')})\n```\n\n#### HTTP Basic Authentication\n\nTo send a request to an endpoint protected by [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), provide the credentials with the `auth` option. Cypress base64-encodes them and attaches an `Authorization` header to the request.\n\n```\ncy.request({  method: 'POST',  url: 'https://api.example.com/query',  auth: {    username: 'jane.lane',    password: 'password123',  },  body: {    cpId: 709916,  },})\n```\n\nThe `auth` option also accepts `user`/`pass` as aliases for `username`/`password`.\n\n#### Download a PDF file\n\nBy passing the `encoding: binary` option, the `response.body` will be serialized binary content of the file. You can use this to access various file types via `.request()` like `.pdf`, `.zip`, or `.doc` files.\n\n```\ncy.request({  url: 'http://localhost:8080/some-document.pdf',  encoding: 'binary',}).then((response) => {  cy.writeFile('path/to/save/document.pdf', response.body, 'binary')})\n```\n\n#### Get Data URL of an image\n\nBy passing the `encoding: base64` option, the `response.body` will be base64-encoded content of the image. You can use this to construct a [Data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) for use elsewhere.\n\n```\ncy.request({  url: 'https://docs.cypress.io/img/logo.png',  encoding: 'base64',}).then((response) => {  const base64Content = response.body  const mime = response.headers['content-type'] // or 'image/png'  // see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs  const imageDataUrl = `data:${mime};base64,${base64Content}`})\n```\n\n#### HTML form submissions using form option\n\nOftentimes, once you have a proper e2e test around logging in, there's no reason to continue to `cy.visit()` the login and wait for the entire page to load all associated resources before running any other commands. Doing so can slow down our entire test suite.\n\nUsing `cy.request()`, we can bypass all of this because it automatically gets and sets cookies as if the requests had come from the browser.\n\n```\ncy.request({  method: 'POST',  url: '/login_with_form', // baseUrl is prepend to URL  form: true, // indicates the body should be form urlencoded and sets Content-Type: application/x-www-form-urlencoded headers  body: {    username: 'jane.lane',    password: 'password123',  },})// to prove we have a sessioncy.getCookie('cypress-session-cookie').should('exist')\n```\n\n#### Using `cy.request()` for HTML Forms\n\n[Check out our example recipe using `cy.request()` for HTML web forms](/llm/markdown/app/references/recipes.md#Logging-In)\n",
      "section": "api",
      "anchors": [
        "options"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 509
    },
    {
      "id": "api/commands/request#request-a-page-while-disabling-auto-redirect",
      "doc_id": "api/commands/request",
      "heading": "Request a page while disabling auto redirect",
      "heading_level": 4,
      "content_markdown": "#### Request a page while disabling auto redirect\n\nTo test the redirection behavior of a login without a session, `cy.request` can be used to check the `status` and `redirectedToUrl` property.\n\nThe `redirectedToUrl` property is a special Cypress property that normalizes the URL the browser would normally follow during a redirect.\n\n```\ncy.request({  url: '/dashboard',  followRedirect: false, // turn off following redirects}).then((resp) => {  // redirect status code is 302  expect(resp.status).to.eq(302)  expect(resp.redirectedToUrl).to.eq('http://localhost:8082/unauthorized')})\n```\n",
      "section": "api",
      "anchors": [
        "request-a-page-while-disabling-auto-redirect"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 96
    },
    {
      "id": "api/commands/request#http-basic-authentication",
      "doc_id": "api/commands/request",
      "heading": "HTTP Basic Authentication",
      "heading_level": 4,
      "content_markdown": "#### HTTP Basic Authentication\n\nTo send a request to an endpoint protected by [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), provide the credentials with the `auth` option. Cypress base64-encodes them and attaches an `Authorization` header to the request.\n\n```\ncy.request({  method: 'POST',  url: 'https://api.example.com/query',  auth: {    username: 'jane.lane',    password: 'password123',  },  body: {    cpId: 709916,  },})\n```\n\nThe `auth` option also accepts `user`/`pass` as aliases for `username`/`password`.\n",
      "section": "api",
      "anchors": [
        "http-basic-authentication"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 84
    },
    {
      "id": "api/commands/request#download-a-pdf-file",
      "doc_id": "api/commands/request",
      "heading": "Download a PDF file",
      "heading_level": 4,
      "content_markdown": "#### Download a PDF file\n\nBy passing the `encoding: binary` option, the `response.body` will be serialized binary content of the file. You can use this to access various file types via `.request()` like `.pdf`, `.zip`, or `.doc` files.\n\n```\ncy.request({  url: 'http://localhost:8080/some-document.pdf',  encoding: 'binary',}).then((response) => {  cy.writeFile('path/to/save/document.pdf', response.body, 'binary')})\n```\n",
      "section": "api",
      "anchors": [
        "download-a-pdf-file"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 67
    },
    {
      "id": "api/commands/request#get-data-url-of-an-image",
      "doc_id": "api/commands/request",
      "heading": "Get Data URL of an image",
      "heading_level": 4,
      "content_markdown": "#### Get Data URL of an image\n\nBy passing the `encoding: base64` option, the `response.body` will be base64-encoded content of the image. You can use this to construct a [Data URI](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) for use elsewhere.\n\n```\ncy.request({  url: 'https://docs.cypress.io/img/logo.png',  encoding: 'base64',}).then((response) => {  const base64Content = response.body  const mime = response.headers['content-type'] // or 'image/png'  // see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs  const imageDataUrl = `data:${mime};base64,${base64Content}`})\n```\n",
      "section": "api",
      "anchors": [
        "get-data-url-of-an-image"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 81
    },
    {
      "id": "api/commands/request#html-form-submissions-using-form-option",
      "doc_id": "api/commands/request",
      "heading": "HTML form submissions using form option",
      "heading_level": 4,
      "content_markdown": "#### HTML form submissions using form option\n\nOftentimes, once you have a proper e2e test around logging in, there's no reason to continue to `cy.visit()` the login and wait for the entire page to load all associated resources before running any other commands. Doing so can slow down our entire test suite.\n\nUsing `cy.request()`, we can bypass all of this because it automatically gets and sets cookies as if the requests had come from the browser.\n\n```\ncy.request({  method: 'POST',  url: '/login_with_form', // baseUrl is prepend to URL  form: true, // indicates the body should be form urlencoded and sets Content-Type: application/x-www-form-urlencoded headers  body: {    username: 'jane.lane',    password: 'password123',  },})// to prove we have a sessioncy.getCookie('cypress-session-cookie').should('exist')\n```\n",
      "section": "api",
      "anchors": [
        "html-form-submissions-using-form-option"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 156
    },
    {
      "id": "api/commands/request#request-polling",
      "doc_id": "api/commands/request",
      "heading": "Request Polling",
      "heading_level": 3,
      "content_markdown": "### Request Polling\n\n#### Call `cy.request()` over and over again\n\nThis is useful when you're polling a server for a response that may take awhile to complete.\n\nAll we're really doing here is creating a recursive function. Nothing more complicated than that.\n\n```\n// a regular ol' function folksfunction req () {  cy    .request(...)    .then((resp) => {      // if we got what we wanted      if (resp.status === 200 && resp.body.ok === true)        // break out of the recursive loop        return      // else recurse      req()    })}cy  // do the thing causing the side effect  .get('button').click()  // now start the requests  .then(req)\n```\n",
      "section": "api",
      "anchors": [
        "request-polling"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 135
    },
    {
      "id": "api/commands/request#call-cy-request-over-and-over-again",
      "doc_id": "api/commands/request",
      "heading": "Call cy.request() over and over again",
      "heading_level": 4,
      "content_markdown": "#### Call `cy.request()` over and over again\n\nThis is useful when you're polling a server for a response that may take awhile to complete.\n\nAll we're really doing here is creating a recursive function. Nothing more complicated than that.\n\n```\n// a regular ol' function folksfunction req () {  cy    .request(...)    .then((resp) => {      // if we got what we wanted      if (resp.status === 200 && resp.body.ok === true)        // break out of the recursive loop        return      // else recurse      req()    })}cy  // do the thing causing the side effect  .get('button').click()  // now start the requests  .then(req)\n```\n",
      "section": "api",
      "anchors": [
        "call-cy-request-over-and-over-again"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 131
    },
    {
      "id": "api/commands/request#notes",
      "doc_id": "api/commands/request",
      "heading": "Notes",
      "heading_level": 2,
      "content_markdown": "## Notes\n\n### JSON request and response bodies\n\n#### Request body serialization\n\nWhen `body` is a JavaScript **object or boolean** and `form` is not `true`, Cypress automatically:\n\n1.  JSON-serializes the request body.\n2.  Adds a `Content-Type: application/json` header to the request.\n\nWhen `body` is a **string**, it is sent as-is and no `Content-Type` header is added automatically.\n\n#### Response body parsing\n\nCypress always inspects the `Content-Type` header of the response. If that header's value ends in `json` (for example `application/json` or `application/vnd.api+json`), `response.body` is automatically parsed into a JavaScript object. Otherwise `response.body` is a string.\n\nThis means the automatic JSON parsing of `response.body` depends entirely on what the server returns in its `Content-Type` header — it is **not** affected by the type of the request `body`.\n\n### Debugging\n\n#### Request is not displayed in the Network Tab of Developer Tools\n\nCypress does not _actually_ make an XHR request from the browser. We are actually making the HTTP request from Cypress (in Node). So, you won't see the request inside of your Developer Tools.\n\n### CORS\n\n#### CORS is bypassed\n\nNormally when the browser detects a cross-origin HTTP request, it will send an `OPTIONS` preflight check to ensure the server allows cross-origin requests, but `cy.request()` bypasses CORS entirely.\n\n```\n// we can make requests to any external server, no problem.cy.request('https://www.google.com/webhp?#q=cypress.io+cors')  .its('body')  .should('include', 'Testing, the way it should be') // true\n```\n\n### Cookies\n\n#### Cookies are automatically sent and received\n\nBefore sending the HTTP request, we automatically attach cookies that would have otherwise been attached had the request come from the browser. Additionally, if a response has a `Set-Cookie` header, these are automatically set back on the browser cookies.\n\nIn other words, `cy.request()` transparently performs all of the underlying functions as if it came from the browser.\n\nCookies 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 [Cookie scope (host-only vs. domain cookies)](/llm/markdown/api/commands/setcookie.md#Cookie-scope-host-only-vs-domain-cookies) for how to scope it to a single exact host with `hostOnly: true`.\n\n### [`cy.intercept()`](/llm/markdown/api/commands/intercept.md)\n\n#### `cy.request()` sends requests to actual endpoints, bypassing those defined using `cy.intercept()`\n\nThe intention of `cy.request()` is to be used for checking endpoints on an actual, running server without having to start the front end application.\n\n### User agent\n\nTrying to change the `User-Agent`?\n\nSee [how to override the browser's default user agent](/llm/markdown/app/faq.md#Can-I-override-or-change-the-default-user-agent-the-browser-uses).\n",
      "section": "api",
      "anchors": [
        "notes"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 568
    },
    {
      "id": "api/commands/request#json-request-and-response-bodies",
      "doc_id": "api/commands/request",
      "heading": "JSON request and response bodies",
      "heading_level": 3,
      "content_markdown": "### JSON request and response bodies\n\n#### Request body serialization\n\nWhen `body` is a JavaScript **object or boolean** and `form` is not `true`, Cypress automatically:\n\n1.  JSON-serializes the request body.\n2.  Adds a `Content-Type: application/json` header to the request.\n\nWhen `body` is a **string**, it is sent as-is and no `Content-Type` header is added automatically.\n\n#### Response body parsing\n\nCypress always inspects the `Content-Type` header of the response. If that header's value ends in `json` (for example `application/json` or `application/vnd.api+json`), `response.body` is automatically parsed into a JavaScript object. Otherwise `response.body` is a string.\n\nThis means the automatic JSON parsing of `response.body` depends entirely on what the server returns in its `Content-Type` header — it is **not** affected by the type of the request `body`.\n",
      "section": "api",
      "anchors": [
        "json-request-and-response-bodies"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 165
    },
    {
      "id": "api/commands/request#request-body-serialization",
      "doc_id": "api/commands/request",
      "heading": "Request body serialization",
      "heading_level": 4,
      "content_markdown": "#### Request body serialization\n\nWhen `body` is a JavaScript **object or boolean** and `form` is not `true`, Cypress automatically:\n\n1.  JSON-serializes the request body.\n2.  Adds a `Content-Type: application/json` header to the request.\n\nWhen `body` is a **string**, it is sent as-is and no `Content-Type` header is added automatically.\n",
      "section": "api",
      "anchors": [
        "request-body-serialization"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 65
    },
    {
      "id": "api/commands/request#response-body-parsing",
      "doc_id": "api/commands/request",
      "heading": "Response body parsing",
      "heading_level": 4,
      "content_markdown": "#### Response body parsing\n\nCypress always inspects the `Content-Type` header of the response. If that header's value ends in `json` (for example `application/json` or `application/vnd.api+json`), `response.body` is automatically parsed into a JavaScript object. Otherwise `response.body` is a string.\n\nThis means the automatic JSON parsing of `response.body` depends entirely on what the server returns in its `Content-Type` header — it is **not** affected by the type of the request `body`.\n",
      "section": "api",
      "anchors": [
        "response-body-parsing"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 92
    },
    {
      "id": "api/commands/request#debugging",
      "doc_id": "api/commands/request",
      "heading": "Debugging",
      "heading_level": 3,
      "content_markdown": "### Debugging\n\n#### Request is not displayed in the Network Tab of Developer Tools\n\nCypress does not _actually_ make an XHR request from the browser. We are actually making the HTTP request from Cypress (in Node). So, you won't see the request inside of your Developer Tools.\n",
      "section": "api",
      "anchors": [
        "debugging"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 63
    },
    {
      "id": "api/commands/request#request-is-not-displayed-in-the-network-tab-of-developer-tools",
      "doc_id": "api/commands/request",
      "heading": "Request is not displayed in the Network Tab of Developer Tools",
      "heading_level": 4,
      "content_markdown": "#### Request is not displayed in the Network Tab of Developer Tools\n\nCypress does not _actually_ make an XHR request from the browser. We are actually making the HTTP request from Cypress (in Node). So, you won't see the request inside of your Developer Tools.\n",
      "section": "api",
      "anchors": [
        "request-is-not-displayed-in-the-network-tab-of-developer-tools"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 60
    },
    {
      "id": "api/commands/request#cors",
      "doc_id": "api/commands/request",
      "heading": "CORS",
      "heading_level": 3,
      "content_markdown": "### CORS\n\n#### CORS is bypassed\n\nNormally when the browser detects a cross-origin HTTP request, it will send an `OPTIONS` preflight check to ensure the server allows cross-origin requests, but `cy.request()` bypasses CORS entirely.\n\n```\n// we can make requests to any external server, no problem.cy.request('https://www.google.com/webhp?#q=cypress.io+cors')  .its('body')  .should('include', 'Testing, the way it should be') // true\n```\n",
      "section": "api",
      "anchors": [
        "cors"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 76
    },
    {
      "id": "api/commands/request#cors-is-bypassed",
      "doc_id": "api/commands/request",
      "heading": "CORS is bypassed",
      "heading_level": 4,
      "content_markdown": "#### CORS is bypassed\n\nNormally when the browser detects a cross-origin HTTP request, it will send an `OPTIONS` preflight check to ensure the server allows cross-origin requests, but `cy.request()` bypasses CORS entirely.\n\n```\n// we can make requests to any external server, no problem.cy.request('https://www.google.com/webhp?#q=cypress.io+cors')  .its('body')  .should('include', 'Testing, the way it should be') // true\n```\n",
      "section": "api",
      "anchors": [
        "cors-is-bypassed"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 73
    },
    {
      "id": "api/commands/request#cookies",
      "doc_id": "api/commands/request",
      "heading": "Cookies",
      "heading_level": 3,
      "content_markdown": "### Cookies\n\n#### Cookies are automatically sent and received\n\nBefore sending the HTTP request, we automatically attach cookies that would have otherwise been attached had the request come from the browser. Additionally, if a response has a `Set-Cookie` header, these are automatically set back on the browser cookies.\n\nIn other words, `cy.request()` transparently performs all of the underlying functions as if it came from the browser.\n\nCookies 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 [Cookie scope (host-only vs. domain cookies)](/llm/markdown/api/commands/setcookie.md#Cookie-scope-host-only-vs-domain-cookies) for how to scope it to a single exact host with `hostOnly: true`.\n",
      "section": "api",
      "anchors": [
        "cookies"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 188
    },
    {
      "id": "api/commands/request#cookies-are-automatically-sent-and-received",
      "doc_id": "api/commands/request",
      "heading": "Cookies are automatically sent and received",
      "heading_level": 4,
      "content_markdown": "#### Cookies are automatically sent and received\n\nBefore sending the HTTP request, we automatically attach cookies that would have otherwise been attached had the request come from the browser. Additionally, if a response has a `Set-Cookie` header, these are automatically set back on the browser cookies.\n\nIn other words, `cy.request()` transparently performs all of the underlying functions as if it came from the browser.\n\nCookies 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 [Cookie scope (host-only vs. domain cookies)](/llm/markdown/api/commands/setcookie.md#Cookie-scope-host-only-vs-domain-cookies) for how to scope it to a single exact host with `hostOnly: true`.\n",
      "section": "api",
      "anchors": [
        "cookies-are-automatically-sent-and-received"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 185
    },
    {
      "id": "api/commands/request#cy-intercept",
      "doc_id": "api/commands/request",
      "heading": "cy.intercept()",
      "heading_level": 3,
      "content_markdown": "### [`cy.intercept()`](/llm/markdown/api/commands/intercept.md)\n\n#### `cy.request()` sends requests to actual endpoints, bypassing those defined using `cy.intercept()`\n\nThe intention of `cy.request()` is to be used for checking endpoints on an actual, running server without having to start the front end application.\n",
      "section": "api",
      "anchors": [
        "cy-intercept"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 51
    },
    {
      "id": "api/commands/request#cy-request-sends-requests-to-actual-endpoints-bypassing-those-defined-using-cy-intercept",
      "doc_id": "api/commands/request",
      "heading": "cy.request() sends requests to actual endpoints, bypassing those defined using cy.intercept()",
      "heading_level": 4,
      "content_markdown": "#### `cy.request()` sends requests to actual endpoints, bypassing those defined using `cy.intercept()`\n\nThe intention of `cy.request()` is to be used for checking endpoints on an actual, running server without having to start the front end application.\n",
      "section": "api",
      "anchors": [
        "cy-request-sends-requests-to-actual-endpoints-bypassing-those-defined-using-cy-intercept"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 48
    },
    {
      "id": "api/commands/request#rules",
      "doc_id": "api/commands/request",
      "heading": "Rules",
      "heading_level": 2,
      "content_markdown": "## Rules\n\n### Requirements\n\n*   `cy.request()` requires being chained off of `cy`.\n*   `cy.request()` requires that the server sends a response.\n*   `cy.request()` requires that the response status code be `2xx` or `3xx` when `failOnStatusCode` is `true`.\n\n### Assertions\n\n*   `cy.request()` will only run assertions you have chained once, and will not [retry](/llm/markdown/app/core-concepts/retry-ability.md).\n\n### Timeouts\n\n*   `cy.request()` can time out waiting for the server to respond.\n",
      "section": "api",
      "anchors": [
        "rules"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 88
    },
    {
      "id": "api/commands/request#requirements",
      "doc_id": "api/commands/request",
      "heading": "Requirements",
      "heading_level": 3,
      "content_markdown": "### Requirements\n\n*   `cy.request()` requires being chained off of `cy`.\n*   `cy.request()` requires that the server sends a response.\n*   `cy.request()` requires that the response status code be `2xx` or `3xx` when `failOnStatusCode` is `true`.\n",
      "section": "api",
      "anchors": [
        "requirements"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 47
    },
    {
      "id": "api/commands/request#command-log",
      "doc_id": "api/commands/request",
      "heading": "Command Log",
      "heading_level": 2,
      "content_markdown": "## Command Log\n\n**_Request comments endpoint and test response_**\n\n```\ncy.request('https://jsonplaceholder.typicode.com/comments').then((response) => {  expect(response.status).to.eq(200)  expect(response.body).to.have.length(500)  expect(response).to.have.property('headers')  expect(response).to.have.property('duration')})\n```\n\nThe commands above will display in the Command Log as:\n\nWhen clicking on `request` within the command log, the console outputs the following:\n",
      "section": "api",
      "anchors": [
        "command-log"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 55
    },
    {
      "id": "api/commands/request#history",
      "doc_id": "api/commands/request",
      "heading": "History",
      "heading_level": 2,
      "content_markdown": "## History\n\n| Version | Changes |\n| --- | --- |\n| [15.20.0](/llm/markdown/app/references/changelog.md#15-20-0) | Added support for `QUERY` method. |\n| [4.7.0](/llm/markdown/app/references/changelog.md#3-3-0) | Added support for `encoding` option. |\n| [3.3.0](/llm/markdown/app/references/changelog.md#3-3-0) | Added support for options `retryOnStatusCodeFailure` and `retryOnNetworkFailure`. |\n| [3.2.0](/llm/markdown/app/references/changelog.md#3-2-0) | 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`. |\n",
      "section": "api",
      "anchors": [
        "history"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 99
    },
    {
      "id": "api/commands/request#see-also",
      "doc_id": "api/commands/request",
      "heading": "See also",
      "heading_level": 2,
      "content_markdown": "## See also\n\n*   [API Testing](/llm/markdown/app/guides/api-testing.md)\n*   [`cy.exec()`](/llm/markdown/api/commands/exec.md)\n*   [`cy.task()`](/llm/markdown/api/commands/task.md)\n*   [`cy.visit()`](/llm/markdown/api/commands/visit.md)\n*   [Recipe: Logging In - Single Sign on](/llm/markdown/app/references/recipes.md#Logging-In)\n*   [Recipe: Logging In - HTML Web Form](/llm/markdown/app/references/recipes.md#Logging-In)\n*   [Recipe: Logging In - XHR Web Form](/llm/markdown/app/references/recipes.md#Logging-In)\n*   [Recipe: Logging In - CSRF Tokens](/llm/markdown/app/references/recipes.md#Logging-In)\n",
      "section": "api",
      "anchors": [
        "see-also"
      ],
      "path": "/llm/json/chunked/api/commands/request.json",
      "token_estimate": 57
    }
  ]
}