cancel
Showing results for 
Search instead for 
Did you mean: 

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

New Contributor

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?

2 REPLIES
Community Leader

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

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
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the title of the post to something more descriptive? This will help people when searching for problems.
New Contributor

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

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. 

Share Your Stories
Read Latest News
Top Kudoed Authors