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:
- Request Cookies — Manually defined cookies sent with your outgoing HTTP requests.
- Response Cookies — Automatically extracted
Set-Cookieheaders parsed from server responses.
Setting Request Cookies
To send cookies with your request:
- Open any HTTP request tab.
- Click the Cookies sub-tab in the request editor.
- Click Add cookie (or the + button).
- 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 |
- You can add multiple cookies. Each cookie is sent via the standard HTTP
Cookieheader during the call. - 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:
- Send your HTTP request.
- In the Response Panel, switch to the Cookies sub-tab.
- Veyak automatically extracts each cookie, displaying:
- Cookie Name
- Value
- Assigned Domain
- 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:
{{placeholders}}are dynamically substituted using your collection’s active environment variables.- If cookies are defined and no manual
Cookieheader is specified in the Headers tab, Veyak automatically formats and transmits them as standardCookie: name=value; ...request headers. - If pre-request scripts update environment variables via
veyak.environment.set(), the updated values are used in cookie substitution immediately.