Is there a way on Postman to pre-execute a request B before executing a request A ?
CONTEXT: I created a Symfony application that manages a set of webservices. Most of the routes can only be called once the user is fully authenticated (using form_login and firewall for those who are familiar with the framework)
Therefore, I have to call first:
POST /login
before being able to call
GET /some_secured_route
(that return a JSON response)
This works fine when I call the routes successively and manually in the Postman builder.
However, I'm trying to create a collection of test to run in the Postman runner. How can I invoke to call the the /login request before testing the a secured route ?
Any help or link to related post would be much appreciated. I wish you all a very good day.
I don't think you can use a custom authentication mode in Postman. I think what you need is Jetpacks for Postman.
Chain requests together: Environment and global variables can be set inside the JS test script. You can extract data from one request and use it inside another request. This allows you to chain multiple requests together.
Now you can use postman interceptor as describer here: https://community.getpostman.com/t/interceptor-integration-for-postman-native-apps/5290
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With