You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using APIDash for my API testing, and it's great! However, I often find myself manually adding auth tokens or transforming data for each request. This gets tedious, especially when working with authenticated APIs or when I need to chain multiple requests together.
What I'm Looking For
I'd love to see something similar to Postman's pre-request and test scripts in APIDash. The idea is to have a simple code editor where we can write JavaScript that runs before and after our requests. This would help with:
Adding auth tokens automatically (no more copy-pasting!)
Setting up environment variables through code
Transforming request/response data on the fly
Chaining API calls (like when you need to get a token first)
Basic testing and validation
Example Use Cases
Auth Token Management
// Pre-request: Add token to headersrequest.headers['Authorization']=`Bearer ${env.get('AUTH_TOKEN')}`;
Dynamic Variables
// Set an env variable based on responseenv.set('USER_ID',response.body.id);
Request Chaining
// Get fresh token if expiredif(response.status===401){// Refresh token logic hereenv.set('AUTH_TOKEN',newToken);}
Why This Would Be Awesome
Saves time on repetitive tasks
Makes working with auth much easier
Helps automate testing flows
Great for complex API workflows
I personally use these features a lot in Postman, and having them in APIDash would make it even better for my daily API development work. Would love to help test this if it gets implemented!
Technical Notes
Need a way to access/modify environment variables
Should be able to modify request/response data
Basic console for debugging would be helpful
The text was updated successfully, but these errors were encountered:
Definitely a useful feature which was added to the roadmap - "Save items in Response headers/body in an Environment variable to be used by other requests. Something like a post-processing script."
Add Pre/Post Request Scripts to APIDash
Why We Need This
I've been using APIDash for my API testing, and it's great! However, I often find myself manually adding auth tokens or transforming data for each request. This gets tedious, especially when working with authenticated APIs or when I need to chain multiple requests together.
What I'm Looking For
I'd love to see something similar to Postman's pre-request and test scripts in APIDash. The idea is to have a simple code editor where we can write JavaScript that runs before and after our requests. This would help with:
Example Use Cases
Auth Token Management
Dynamic Variables
Request Chaining
Why This Would Be Awesome
I personally use these features a lot in Postman, and having them in APIDash would make it even better for my daily API development work. Would love to help test this if it gets implemented!
Technical Notes
The text was updated successfully, but these errors were encountered: