<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HTTP monitor - Post-execution script - XML format in the response in Synthetic Monitoring</title>
    <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/196640#M1532</link>
    <description>&lt;P&gt;This solution worked for me to parse some SOAP/XML.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wish Dynatrace would update their documentation to tell you all the methods that work in the pre &amp;amp; post-execution boxes for synthetics. It frustrating that you have to come to the community to find out that certain javascript methods work in the boxes. Just tell us up front. The documentation for working with JSON is pretty good.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Oct 2022 19:47:49 GMT</pubDate>
    <dc:creator>jkinner</dc:creator>
    <dc:date>2022-10-17T19:47:49Z</dc:date>
    <item>
      <title>HTTP monitor - Post-execution script - XML format in the response</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/183635#M1220</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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?.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Carlos&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 07:59:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/183635#M1220</guid>
      <dc:creator>carlos_ortega</dc:creator>
      <dc:date>2022-03-31T07:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP monitor - Post-execution script - XML format in the response</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/183650#M1221</link>
      <description>&lt;P&gt;Hi Carlos,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you should be fine working with xml without converting it. This is a snippet I used for finding a string in an xml response:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var body = response.getResponseBody();
PubDateString = body.match(/&amp;lt;pubDate&amp;gt;(.*?)&amp;lt;\/pubDate&amp;gt;/g)[0];
api.info(&lt;SPAN&gt;"PubDateString is : "&lt;/SPAN&gt;+PubDateString);&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 15:46:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/183650#M1221</guid>
      <dc:creator>HannahM</dc:creator>
      <dc:date>2022-03-30T15:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: HTTP monitor - Post-execution script - XML format in the response</title>
      <link>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/196640#M1532</link>
      <description>&lt;P&gt;This solution worked for me to parse some SOAP/XML.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wish Dynatrace would update their documentation to tell you all the methods that work in the pre &amp;amp; post-execution boxes for synthetics. It frustrating that you have to come to the community to find out that certain javascript methods work in the boxes. Just tell us up front. The documentation for working with JSON is pretty good.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 19:47:49 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Synthetic-Monitoring/HTTP-monitor-Post-execution-script-XML-format-in-the-response/m-p/196640#M1532</guid>
      <dc:creator>jkinner</dc:creator>
      <dc:date>2022-10-17T19:47:49Z</dc:date>
    </item>
  </channel>
</rss>

