Our solution
Programmable request lifecycle
Custom Scripts add a JavaScript execution layer at three points in the request lifecycle. Pre-flight handles auth globally. Pre-operation and post-operation scripts give each tab its own setup and validation logic.
Request lifecycle with scripts
Pre-flight scripts run first, globally across all playground tabs. Use them for authentication — fetch a token, store it with playground.env.set, and inject it via the {{token}} header syntax.
Pre-operation scripts run per tab, after the pre-flight but before the request. Use them for tab-specific header injection or variable setup.
Post-operation scripts run per tab after the response arrives. Use them to validate that expected fields are present or to transform data.
Scripts access the playground API object: playground.env.get and set for environment variables, playground.request.body for the request, playground.response.body for the response.
The built-in CryptoJS library is available for encryption, decryption, and HMAC token handling.
External fetch is supported, so scripts can call OAuth endpoints or any REST API accessible from the browser.
Authenticate once. Test without interruption.

