I have a collection with 2 requests (A and B), how can I call A from B?
Request A gets a token and set the token to a collection variable.
Request B makes a GET request against an API using the token collection variable set by request A.
I usually run A first, then run B.
I tried the “Run collection” option, but I cannot see the API response when request B is run.
Other posts indicate to use Pre-request Script with complete JS scripts, but I just want to run an existing request on the collection.
Correct me if I am wrong. Do you want to use the token which you fetched in request A and use it in request B?
If so, then in the test script of request A, you can set the value of the token to a collection variable. And in request B use the variable in the request or in place of token value.