thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Get Request ID

Open mjohl opened this issue 1 year ago • 2 comments

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.

mjohl avatar May 28 '24 14:05 mjohl

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

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

rangav avatar May 28 '24 14:05 rangav

@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");

mjohl avatar May 28 '24 16:05 mjohl

Request id is displayed in the Pre-Run tab Screenshot 2024-11-03 at 19 28 27

rangav avatar Nov 03 '24 19:11 rangav

@rangav Thank you for the id in the UI. Small niggle that it copies the GUID along with a newline character, but a lot of systems do that, so used to it pressing ctrl+v then backspace.

mjohl avatar Nov 03 '24 22:11 mjohl