30 Mar 2022 07:09 AM - last edited on 31 Mar 2022 12:59 AM by MaciejNeumann
I have a HTTP Check in which I receive the response in XML format. However, I need to use that response in a post-execution script to launch a second request to other HTTP web service.
I have read that Json in the only format in which we could use the post-execution script. So, Is there any way to convert the XML response to a JSON format in the "post-execution script" that we could add in a Http monitor?.
Solved! Go to Solution.
you should be fine working with xml without converting it. This is a snippet I used for finding a string in an xml response:
var body = response.getResponseBody(); PubDateString = body.match(/<pubDate>(.*?)<\/pubDate>/g); api.info("PubDateString is : "+PubDateString);
This solution worked for me to parse some SOAP/XML.