thunderclient / thunder-client-support

Thunder Client is a lightweight Rest API Client Extension for VS Code.
https://www.thunderclient.com
Other
3.59k stars 128 forks source link

Get Request ID #1554

Open mjohl opened 1 month ago

mjohl commented 1 month ago

Question:

Are you using the free version/paid version/trial: PAID Version

According to the documentation, you can do the following:

var result = await tc.runRequest("reqId");

My question is the following:

How do I get the "reqId" of the other request? The UI has no way of getting it to my knowledge and having to export the collection the whole time to get ID's are super annoying.

rangav commented 1 month ago

@mjohl thanks for feedback, Will display id in the UI.

you can get id using below code console.log(tc.request.id)

mjohl commented 1 month ago

@rangav Looking forward to the improvement. The better improvement would be to call the other request by "Name". So instead of: var result = await tc.runRequest("reqId"); We could use: var result = await tc.runRequest("Get All Members");

It would make the readability a lot better, but I understand the complexity behind this as you now have to find the request in the collection.

The trophy solution would be a second optional parameter where I can call a request from another collection: var result = await tc.runRequest("Run Request A", "From Coll A");