Documentation Menu▼

Cookies

Veyak provides dedicated tools to inspect, manage, and test HTTP cookies across your API requests.


Overview

Cookies are critical for session-based authentication, token rotation, and tracking state across stateful web services. Veyak separates cookie workflows into:

  1. Request Cookies — Manually defined cookies sent with your outgoing HTTP requests.
  2. Response Cookies — Automatically extracted Set-Cookie headers parsed from server responses.

Setting Request Cookies

To send cookies with your request:

  1. Open any HTTP request tab.
  2. Click the Cookies sub-tab in the request editor.
  3. Click Add cookie (or the + button).
  4. Fill in the fields:
Field Description Example
Name Cookie key name session_id
Value Cookie payload or token abc123xyz789
Domain Target domain scope api.example.com
  1. You can add multiple cookies. Each cookie is sent via the standard HTTP Cookie header during the call.
  2. To delete a cookie, click the Trash icon next to the row.

Inspecting Response Cookies

When a server sets one or more cookies via the Set-Cookie response header:

  1. Send your HTTP request.
  2. In the Response Panel, switch to the Cookies sub-tab.
  3. Veyak automatically extracts each cookie, displaying:
    • Cookie Name
    • Value
    • Assigned Domain
  4. This makes it simple to verify whether login endpoints, session generators, or csrf tokens are issuing the expected cookie attributes without having to parse raw header strings manually.

Using Environment Variables with Cookies (v0.8.0)

As of Veyak v0.8.0, variable interpolation {{variable}} is supported end-to-end across cookie names, values, and domains:

Name:   session_{{ENV_NAME}}
Value:  {{ACTIVE_SESSION_TOKEN}}
Domain: {{API_DOMAIN}}

When you send a request:

  1. {{placeholders}} are dynamically substituted using your collection’s active environment variables.
  2. If cookies are defined and no manual Cookie header is specified in the Headers tab, Veyak automatically formats and transmits them as standard Cookie: name=value; ... request headers.
  3. If pre-request scripts update environment variables via veyak.environment.set(), the updated values are used in cookie substitution immediately.