Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rangav authored Mar 21, 2024
1 parent 8a682b4 commit eef1676
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,15 +256,19 @@ tc.setVar("baseUrl", "http://localhost:8744", "request");

## Set Environment Variable

<img width="757" alt="Screenshot 2024-03-21 at 17 05 20" src="https://github.com/rangav/thunder-client-support/assets/8637550/efd4ebc7-f857-45ec-b078-6ce482f1b031">



Setting environment variables is supported in the Tests tab. Follow the steps below:

- Create an environment first from the Env tab (if it's not already created).
- In the Tests tab, select the `Set Env Variable` dropdown option (The action will automatically become `setTo`).
- Enter the appropriate source of the variable value in the left input box:
- **Header:** Enter `header.headerName` where `headerName` is the response header name.
- **Cookie:** Enter `cookie.cookieName` where `cookieName` is the response cookie name.
- **JSON Response:** Enter `json.propertyName` where `propertyName` is the JSON key in the response body.
- **Text Response:** Enter the `text` keyword. This sets the entire response body to the variable.
- **Header:** Enter `header.headerName` where `headerName` is the response header name.
- **Cookie:** Enter `cookie.cookieName` where `cookieName` is the response cookie name.
- **Custom Value:** To set any custom value manually, Just type the text as required in the left input e.g `processing`
- **Clear Value:** To clear values use `null` keyword in the left input.
- **Delete Variable:** To delete a variable completely use the `delete` keyword in left input.
Expand Down

0 comments on commit eef1676

Please sign in to comment.