Is there a way to validate the contents in the request body before sending the request.
for example ,
- To validate if a particular xml tag appears twice.
- To check if a particular xml value is present in xml
Postman version:win64-7.25.0
Is there a way to validate the contents in the request body before sending the request.
for example ,
Postman version:win64-7.25.0
Hey @sopau, welcome to the community!
You most certainly can validate data before itβs used in the request being sent.
For this, you would need to add code to the βPre-request Scriptβ which is executed before the request is sent!
Postman Sandbox comes bundled with popular Node.js modules that should help you manipulate and use XML data.
checkout Cheerio and xml2js modules which should come useful to handle XML data.
Also, have a look at this post: Working with XML in Postman Scripts , linking to a tutorial-video, which looks to be pretty comprehensive!