<?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: Get returned value on Curl  in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30654#M13046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must write a response template using FreeMarker template to render the HTTP response. You will not automatically get "arr" as a response. Also, for the template to be able to render elements of "arr" you must put it into the "model" variable, e.g. "model.arr = arr;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Aug 2017 11:52:33 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2017-08-03T11:52:33Z</dc:date>
    <item>
      <title>Get returned value on Curl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30653#M13045</link>
      <description>I have a main function in my webscript:mywebscript.jsfunction main(){........return arr;}main();How do I get arr when I call this script using curl command.curl "http://.../alfresco/service/mywebscript"</description>
      <pubDate>Thu, 03 Aug 2017 00:37:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30653#M13045</guid>
      <dc:creator>sakshik</dc:creator>
      <dc:date>2017-08-03T00:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get returned value on Curl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30654#M13046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You must write a response template using FreeMarker template to render the HTTP response. You will not automatically get "arr" as a response. Also, for the template to be able to render elements of "arr" you must put it into the "model" variable, e.g. "model.arr = arr;"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 11:52:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30654#M13046</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-08-03T11:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: Get returned value on Curl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30655#M13047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I can write&lt;STRONG&gt; "model.arr = arr"&lt;/STRONG&gt; in my script and fetch its value in FreeMarker template using &lt;STRONG&gt;${arr}&lt;/STRONG&gt;. but arr is an associative array and I need to loop through that and feed the values into an sql table which is where I am calling the curl command in a ruby based script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can fetch the value of a &amp;lt;p&amp;gt;&amp;lt;/p&amp;gt; tag of FreeMarker template file using :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;curl "&lt;/SPAN&gt;&lt;A class="unlinked"&gt;http://.../alfresco/service/mywebscript&lt;/A&gt;&lt;SPAN style="color: #727174; background-color: #ffffff; border: 0px;"&gt;"&amp;nbsp;| grep&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;\'(?&amp;lt;=&amp;lt;p&amp;gt;).*?(?=&amp;lt;/p&amp;gt;)\'&lt;/STRONG&gt; but I cannot grep on a table and get the value of multiple &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;s.&lt;/P&gt;&lt;P&gt;And that is why I need arr to fetch where I am calling curl.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 16:43:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30655#M13047</guid>
      <dc:creator>sakshik</dc:creator>
      <dc:date>2017-08-03T16:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Get returned value on Curl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30656#M13048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your freemaker template may&amp;nbsp;render in json format, and then you can parse your curl result via jq or jshon commands instead of greping this way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;--C.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 16:51:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30656#M13048</guid>
      <dc:creator>cesarista</dc:creator>
      <dc:date>2017-08-03T16:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Get returned value on Curl</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30657#M13049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rendering in json ftl worked .&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 21:44:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/get-returned-value-on-curl/m-p/30657#M13049</guid>
      <dc:creator>sakshik</dc:creator>
      <dc:date>2017-08-03T21:44:11Z</dc:date>
    </item>
  </channel>
</rss>

