Forum Discussion
ChrisA
5 years agoContributor
Hi,
Whilst I understand what you are trying to achieve, your request is still vague. What have tried so far? Is the token returned in the header or body of the request (I've done similar things where node of interest has been in both)?
Does the token form part of the URL for the second call, or just something passed in the body?
Here's a rough example of something I use for some tests. In short, I call a GET service to obtain a transaction id. The transaction id is suffixed to the URL. I then use this URL, with the transaction id, to call a POST service.
// In this example, I've already called the get and I need to access the location property
// which I will then in in the post part.
// Go and get the full URL, including token, from the GET call.
def locationAndToken = testRunner.testCase.testSteps["first-call-test-step-name"].testRequest.responseHeaders["Location"];
testRunner.testCase.testSteps["second-call-test-step-name"].properties["Endpoint"].value = locationAndToken;
Related Content
- 2 years ago
- 13 years ago
- 4 years ago
- 6 years ago
Recent Discussions
- 15 years ago