{
  "classes": [
    {
      "constants": [],
      "types": [],
      "name": "@eryx/http/CookieJar",
      "tags": [],
      "functions": [],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "A cookie jar that stores cookies and automatically attaches them to\nmatching requests.\n\n```luau\nlocal jar = http.CookieJar.new()\n\n-- Make requests with automatic cookie handling\nlocal resp = http.get(\"http://example.com/login\", { cookies = jar })\n-- jar now contains any Set-Cookie headers from the response\n\n-- Subsequent requests send matching cookies automatically\nlocal resp2 = http.get(\"http://example.com/dashboard\", { cookies = jar })\n```\n"
    },
    {
      "is_primary_export": false,
      "source": {
        "path": "",
        "line": 25
      },
      "tags": [],
      "properties": [
        {
          "tags": [],
          "lua_type": "_cookies: { cookies.Cookie }",
          "name": "_cookies",
          "desc": ""
        }
      ],
      "desc": "",
      "name": "CookieJar",
      "functions": [
        {
          "source": {
            "path": "",
            "line": 32
          },
          "is_method": false,
          "signature": "CookieJar.new() → (\n    CookieJar  -- A new cookie jar. \n)",
          "owner": "CookieJar",
          "desc": "Creates a new, empty cookie jar.\n",
          "tags": [],
          "name": "new",
          "return_str": "CookieJar",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "CookieJar",
              "desc": "A new cookie jar. "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 47
          },
          "is_method": true,
          "signature": "CookieJar:parseSetCookie(\n    setCookieHeader: string,  -- The raw `Set-Cookie` header value.\n    requestHost: string,  -- The host the request was sent to.\n    requestPath: string  -- The path the request was sent to. \n) → ()",
          "owner": "CookieJar",
          "desc": "Stores cookies from a `Set-Cookie` response header.\n\nParses the header value and stores the cookie with proper domain\nand path defaults derived from the request URL. Existing cookies\nwith the same name/domain/path are replaced.\n",
          "tags": [],
          "name": "parseSetCookie",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "setCookieHeader",
              "desc": "The raw `Set-Cookie` header value."
            },
            {
              "lua_type": "string",
              "name": "requestHost",
              "desc": "The host the request was sent to."
            },
            {
              "lua_type": "string",
              "name": "requestPath",
              "desc": "The path the request was sent to. "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 75
          },
          "is_method": true,
          "signature": "CookieJar:getCookies(\n    scheme: string,  -- The request scheme (`\"http\"` or `\"https\"`).\n    host: string,  -- The request host.\n    path: string  -- The request path.\n) → (\n    { Cookie }  -- Matching cookies. \n)",
          "owner": "CookieJar",
          "desc": "Returns all cookies that match the given URL components.\n\nExpired cookies are automatically removed. Only cookies whose\ndomain and path match the request are returned.\n",
          "tags": [],
          "name": "getCookies",
          "return_str": "{ cookies.Cookie }",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "{ cookies.Cookie }",
              "desc": "Matching cookies. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "scheme",
              "desc": "The request scheme (`\"http\"` or `\"https\"`)."
            },
            {
              "lua_type": "string",
              "name": "host",
              "desc": "The request host."
            },
            {
              "lua_type": "string",
              "name": "path",
              "desc": "The request path."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 106
          },
          "is_method": true,
          "signature": "CookieJar:headerFor(\n    scheme: string,  -- The request scheme.\n    host: string,  -- The request host.\n    path: string  -- The request path.\n) → (\n    string?  -- The `Cookie` header value, or `nil` if no cookies match. \n)",
          "owner": "CookieJar",
          "desc": "Builds the `Cookie` header string for a request to the given URL.\n",
          "tags": [],
          "name": "headerFor",
          "return_str": "string?",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "string?",
              "desc": "The `Cookie` header value, or `nil` if no cookies match. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "scheme",
              "desc": "The request scheme."
            },
            {
              "lua_type": "string",
              "name": "host",
              "desc": "The request host."
            },
            {
              "lua_type": "string",
              "name": "path",
              "desc": "The request path."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 124
          },
          "is_method": true,
          "signature": "CookieJar:count() → (\n    number  -- The cookie count. \n)",
          "owner": "CookieJar",
          "desc": "Returns the number of cookies stored in the jar.\n",
          "tags": [],
          "name": "count",
          "return_str": "number",
          "function_type": "Method",
          "returns": [
            {
              "lua_type": "number",
              "desc": "The cookie count. "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 131
          },
          "is_method": true,
          "signature": "CookieJar:clear() → ()",
          "owner": "CookieJar",
          "desc": "Removes all cookies from the jar.\n",
          "tags": [],
          "name": "clear",
          "return_str": "",
          "function_type": "Method",
          "returns": [],
          "params": []
        }
      ],
      "metamethods": [],
      "types": []
    }
  ]
}