- Before the request (Pre Request)
- After receiving the response (Post Response)
Variables are scoped within the request and cannot be accessed outside of it. This ensures clean separation between different requests.
Pre Request Vars
In the Vars tab > Pre Request variables section, you can write any strings, numbers or any valid JavaScript literal. Example:
Post Response Vars
In the Vars tab > Post Response variables section, you can write any valid JavaScript expression. Theres object is available, allowing you to declaratively parse the response object and set variables, instead of writing scripts to do the same.
Example:
