跳到主要内容

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 example: if we need to include a token parameter in the header for every interface request within the project, we could manually write the token for each interface's header. However, this approach might make future maintenance and modifications cumbersome.

We open the global manager, switch to the global parameter settings, and fill in the token parameter in the global header:

image.png

image.png

Then every time we send an interface, it will automatically carry this parameter in the request header:

image.png In addition to the header, params, body, Auth, Cookie, Pre-request, Post-response also support global settings.

Once configured, each interface will automatically include the global settings during debugging.

提示

Note: The entire body only supports form-data and urlencoded.