Forum Discussion

hazel_chua's avatar
hazel_chua
Contributor
5 years ago

Using dynamic templates in a REST API POST Request

Hi,   Currently, I have a few templates that are to be used within a REST API POST request, all of which are JSON format.  The templates contain fields that need to be updated at the time of each c...
  • nmrao's avatar
    nmrao
    5 years ago
    hazel_chua,
    Possibly here is what I can think of.
    - have a groovy script test step before the current rest test step.
    - since you knew the condition based on the current row of the data source, retrieve the respective template for the post request
    - set the request to the following rest test step (I guess, sample code snippet available how to set request to the step from GitHub.com/nmrao (have search from available scripts)