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

No options to reset a variable [ On Pre request ]

Open KSandeep06 opened this issue 3 years ago • 3 comments

Hello, Basically, I want to set a variable to blank before calling a Request.

E.g. I have a variable {{token}} now, I want to clear that before [Pre request] i call a LOGOUT api.

KSandeep06 avatar Aug 11 '22 16:08 KSandeep06

Hi @KSandeep06

Please see the details below https://github.com/rangav/thunder-client-support#setenv

Screenshot 2022-08-11 at 17 29 55

rangav avatar Aug 11 '22 16:08 rangav

Got it but how to use it ? 🙄 I want to delete variable only when call LOGOUT api.

Sandeep06Dev avatar Aug 11 '22 17:08 Sandeep06Dev

From the Tests tab of the request, select Set Env Variable dropdown option

Screenshot 2022-08-11 at 18 11 35

rangav avatar Aug 11 '22 17:08 rangav

Thanks

Sandeep06Dev avatar Aug 11 '22 17:08 Sandeep06Dev

I am closing the issue, feel free to re-open if needed.

rangav avatar Aug 11 '22 18:08 rangav