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

Highlighted
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 2
Highlighted
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
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 Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
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. 

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors