Skip to main content

Environment、Global and Cookie

🌍 Access

  • Click on "..." next to the product name, then select "Environment" to access the environment management interface.
  • In the top right corner of the API debugging area, the left button leads to the Environment Management interface, while the right button directs you to Global Parameter Settings.

image.png

Environment

When developing and debugging interfaces, it is common to switch between different environments. Constantly changing the interface request URL can considerably prolong debugging time.

Therefore, you can use environment management to swiftly switch the pre-URL of the interface, enabling you to debug the same interface across different environments efficiently.

🔎 For detailed information on Environment, please refer to the Client User Manual - Environment.

image.png

The primary function of the COOKIE manager is to store and manage the cookies returned by the server during an interface request, and automatically include them in subsequent requests when necessary.

🔎 For detailed information on Cookie, please refer to the Client User Manual - Cookie.

image.png

Global Param

In real-world projects, multiple interfaces often share the same request parameters. In such cases, we can use global or directory-level parameters to 'set once, use multiple times; modify once, update everywhere.'

🔎 For detailed information on Global Parameters, please refer to the Client User Manual - Global Parameters.

image.png

Global Variables

What are Global Variables? Global variables differ from environment variables in their scope of application. Global variables are not influenced by the current environment and will remain active across the entire project.

Global and environment variables use the same syntax for referencing: {{variable name}}

🔎 For detailed information on Global Variables, please refer to the Client User Manual - Global Variables.

image.png

EchoAPI Built-in Variables

EchoAPI's built-in system variables include the request object and the response object.

🔎 For detailed information on EchoAPI Built-in Variables, please refer to the Client User Manual - Built-in Variables.

image.png

Built-in Faker Library Variables

The Faker library allows you to generate sample data in EchoAPI using predefined variables, functioning like any other variable in Postman. Their values are generated at runtime, with names starting with a $, such as $guid or $timestamp.

🔎 For detailed information on Built-in Faker Library Variables, please refer to the Client User Manual - Faker Library Variables.

image.png