To call a global variable at any time, you need to use these two pairs of braces!

Time:2022-6-25

conductAPIWhen testing, we sometimes need to call global variables. stayEoapiIn, we use two pairs of braces to represent global variablesEnvironment bullet frameSet the global variables in theAPIWhen testing, it is very convenient to use two pairs of braces to call at any time.

Set global variables

▷ set global variables to facilitate calling during testing. In the API management module, clickmanagement environment

To call a global variable at any time, you need to use these two pairs of braces!
Enter the environment drop-down box

▷ entryEnvironment bullet frameAfter that, fill in the corresponding environment (create a new environment first) presetGood variable name and valueIt is worth noting that there is no need to add two pairs of braces to fill in the global variables here.

To call a global variable at any time, you need to use these two pairs of braces!
Fill in global variables

Call global variables

▷ inAPI test page, add global variables to the request parameters. It says that inEoapiIn, we use two pairs of braces to represent global variables. Here, we need to pay special attention to selecting the right environment to successfully call and send.

To call a global variable at any time, you need to use these two pairs of braces!
Call global variables

▷ global variable parameter call succeeded. After clicking test, we can see that the presettokenParameters.

To call a global variable at any time, you need to use these two pairs of braces!
Call successful

If you think my sharing is enlightening or helpful to you, don’t give me a like and support!


My name isEoapiI am a postman like open source API tool, ILighter weight, andExpandable! I can simplify your API development so that you can create APIs faster and better.

If you are interested in my open source project, you can come here:
Eoapi official websiteperhapsGithub


Previous good articles

Eoapi – an extensible open source API tool
An article teaches you how to debug HTTP API
Web API design principles and rules
Angualr is hard to master? Start with 8 open source projects
Deploy an interface test tool through vercel in 5 minutes!