Overview
LiteClient supports dynamic variable substitution using the{{variableName}} syntax. Variables can be used throughout your requests to create reusable, environment-specific configurations.
Variable Syntax
Variables are enclosed in double curly braces:Where Variables Work
Variables can be used in:- URLs:
{{baseUrl}}/api/users/{{userId}} - Headers: Both keys and values
- Request body: All body modes (JSON, form-data, etc.)
- Authentication credentials: API keys, OAuth parameters
Variable Types
LiteClient usesEnvironmentVariable objects with the following properties:
id- Unique identifiername- Variable name (used in{{name}}syntax)initialValue- The variable’s valuetype- Eitherdefaultorsecretenabled- Boolean flag to enable/disable the variable
Only enabled variables are resolved during request execution.
Variable Resolution Order
When a request is executed, LiteClient resolves variables using a layered precedence system. The narrowest scope wins:1
Global Variables
Global variables are always available regardless of the selected environment. They provide base values accessible across all requests.
2
Collection Variables
Collection-scoped variables override global variables. These are specific to requests within a collection.
3
Environment Variables
Environment variables have the highest precedence and override both global and collection variables. Use these for environment-specific configurations (development, staging, production).
Resolution Example
If you have:- Global variable:
baseUrl = https://api.example.com - Collection variable:
baseUrl = https://api.dev.example.com - Environment variable:
baseUrl = https://api.staging.example.com
https://api.staging.example.com (environment scope wins).
Autocomplete
LiteClient provides an autocomplete dropdown when typing variables:- Type
{{to trigger autocomplete - Start typing the variable name
- Use arrow keys to navigate available variables
- Press Enter to select
Creating Variables
Global Variables
Global variables are always available:1
Open Environment Tab
Switch to the Env tab in the LiteClient sidebar
2
Access Globals
Select the Globals section
3
Add Variable
Click Add Variable and enter name and value
Environment Variables
Create environment-specific variables:1
Create Environment
In the Env tab, click New Environment
2
Name Environment
Enter a name (e.g., “Development”, “Production”)
3
Add Variables
Click Add Variable and configure your environment-specific values
4
Select Environment
Choose the environment from the dropdown in any request panel
Best Practices
Use Descriptive Names
Name variables clearly:
apiBaseUrl instead of url, authToken instead of tokenSecret Variables
Mark sensitive data (API keys, tokens) as
secret typeGlobal for Shared Values
Use global variables for values shared across all environments
Environment for Configs
Use environments to manage different configurations (dev, staging, prod)