Accessing w/ Postscript
Last updated
Last updated
The Postscript feature is very useful when you want to use coded variables on different API requests. With this feature, you can access then throughout your automated flow. This is helpful when you need to store and use information from a previous API request in subsequent requests.
In this test case we have an API returning a list of fruits as a JSON
object.
From that list, we'll be extracting the name and the calories from the "Apple" object and use it on our next requests.
We can now access this object and it's attributes such that:
To test this out we can use the console.log
method to print out appleName and appleCategories
You can now access those variables within the rest of your flow.
You can use Postscript print out values from the Extractions section used across the flow.
Here are the steps:
Create any extraction from the Extractions section.
Open your Postscript section.
Assign the extracted parameter to postscript.
ie: const name = extractedParameterName;