---
title: "Returns all cookies from the request as JSON."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/cookies_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# Returns all cookies from the request as JSON.

`GET` `/cookies`

Operation ID: `cookies_handler`

Parses the `Cookie` header and returns a JSON object with a `cookies` key containing a map of cookie name-value pairs. # Example Response ```json { "cookies": { "session": "abc123", "theme": "dark" } } ```

## Responses

- `200` - Returns all cookies from the request

## OpenAPI definition

````yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /cookies:
    get:
      tags:
        - crate::routes::cookies
      summary: Returns all cookies from the request as JSON.
      description: >-
        Parses the `Cookie` header and returns a JSON object with a `cookies`
        key

        containing a map of cookie name-value pairs.


        # Example Response


        ```json

        { "cookies": { "session": "abc123", "theme": "dark" } }

        ```
      operationId: cookies_handler
      responses:
        "200":
          description: Returns all cookies from the request
          content:
            application/json:
              schema: {}
````
