2
votes

I got a XML response from the service:

<token>80e7a83101cfd4f73920c7b4fdbe7f096fa9499c</token>

which is used in following POST requests as a Body param:

token=80e7a83101cfd4f73920c7b4fdbe7f096fa9499c

Is there a way how to create a dynamic value from the token? I need to copy-paste it manually every time...

1

1 Answers

1
votes

Absolutely. Request Parsed Dynamic Values are working with JSON, XML and Form URL-Encoded bodies. Some docs is available here (though it's for JSON, and XML is not as well integrated in the UI): https://paw.cloud/docs/advanced/reuse-values-from-previous-responses

Here are some detailed steps for XML:

Right-click on a field, and pick: Response > Response Parsed Body

enter image description here

Enter the XML path to the object you want to access:

enter image description here

Unfortunately the XML path library we're currently using isn't always consistent, so to access text nodes, try .text or .text[0]

In this example, I access the path slideshow.slide.title.text[0] this XML: https://httpbin.org/xml