- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to clear the global variables in Postman?
We can clear the Global variables in Postman at runtime with the help of scripts. This is done with the help of the pm.* function. The script to clear the Global variables can be incorporated either in the Tests or Pre-Request Script tab
To clear the Global variable, the script should be −To clear the Global variable, the script should be −
pm.globals.unset('<name of Global variable>')
Let us try to clear the Global variable url.
Step1 − Add the below script in the Pre-request Script tab −
Step2 − Click on Send to execute a request.
Step3 − After the Response is received, click on the eye icon to the right upper corner of the Postman application. Now, it no longer shows the Global variable url which was previously available.
- Global Scope Variables in Postman?
- How to set a global variable in Postman?
- How to create a Global Variable in Postman?
- How to use Global Variable in Postman Request?
- How to Use Environment Variables in Postman?
- How to declare global variables in Android?
- How to use global variables in Ruby?
- Global variables in Java
- Global Variables in Lua Programming
- What are local variables and global variables in C++?
- What are global variables in C++?