Save API response to environment variable
Preconditions (2)
Step 1: Open Postman and create a new GET request to 'https://jsonplaceholder.typicode.com/todos/1'
Step 2: Send the request
Step 3: In the Tests tab, write a script to save the 'title' field from the JSON response to an environment variable named 'todoTitle'
Step 4: Save the request
Step 5: Send the request again
Step 6: Verify that the environment variable 'todoTitle' is set with the value from the response
✅ Expected Result: The environment variable 'todoTitle' contains the 'title' value from the API response after the request is sent