Simple Assertions vs Pre & Post Requests
Many developers already use Assertions in Voiden to validate responses—checking status codes, verifying fields, or ensuring data formats.
They are great for simple validation and quick checks after a request.
But what if your workflow needs more than validation? That’s where Pre & Post Request Scripts come in.

Pre-request scripts run before the request: generate tokens, set dynamic headers, compute values, inject variables, or prepare data on the fly.
Post-request scripts run after the response: validate responses, extract values, store variables, trigger follow-up logic, or chain multiple requests together.
When to use Assertions: simple checks and validations, fast feedback, lightweight workflows.
When to use Pre & Post Scripts: dynamic APIs, token rotation, multi-step flows, automated chaining, or when your workflow requires more complex logic.
Use assertions for quick checks and scripts for dynamic, automated workflows.
Voiden now supports JavaScript and Python for Pre & Post Request Scripts (available in the beta, link below).
Question for the community: Which other languages would you like to see supported in Voiden?
Your feedback could shape the next updates!
🌐 Beta: https://voiden.md/download#beta
📂 GitHub: https://github.com/VoidenHQ/voiden
Top comments (0)