Forum Discussion

saimie's avatar
saimie
New Contributor
6 years ago

Unable to transfer a value from a previous request and use as a TEMPLATE paramater

I have 2 REST requests.

 

1. POST /details

2. GET /details/{customerId}

 

In response for POST /details, I receive a customerId. When I attempt to use that customerId in the second call, I am unable to. I do not use a Property Transfer Step. Instead, I use the following syntax using point-and-click functionality ${POST /details#Response#$[‘customerId’]}.

 

I use this value in the template parameter for call 2 and it does not work as it does not send the value as a whole but instead add random strings such as %customerId%.

 

Is there a way to solve this rather than to use the property transfer step?

  • richie's avatar
    richie
    Community Hero
    Hi,

    Is there a significant reason you dont want to rely on a property transfer step. I think i tried the method you describe acouple of months ago, it didnt work (assumed idmade a mistake somewhere) and so got it working with the property transfer step.

    Richie
    • saimie's avatar
      saimie
      New Contributor

      Hey Richie,

       

      Thanks for your reply! 

       

      It works with the property transfer step but I tend to stay away with property transfer steps and where possible, use the point and click feature. However, I did manage to get it working with a property transfer but I think that this should actually work in fairness as it's possible to transfer values int he same way for other paramater types (HEADER etc). 

       

      In regards to your question as to whether there's a significant reason why I don't want to rely on a property transfer -  it's just down to preference. I tend to stay away from the use of the property transfer step for a "cleaner look" and feel of the tests.