<?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 reply/response in PersistentServerConnectionApplication in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748964#M11978</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;how can I reply to the sending endpoint not using return as I want to keep the connection open?&lt;/P&gt;&lt;P&gt;My endpoint works as long as I respond via the return through the appserver but I do not want to close the connection. I tried using yield with json.dumps but then the appserver throws a serialization error.&lt;/P&gt;&lt;P&gt;Doing this async it also something the appserver does not like.&lt;/P&gt;&lt;P&gt;How can I do something like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;response {'a':'1'}&lt;/P&gt;&lt;P&gt;... do something&lt;/P&gt;&lt;P&gt;return {'a':'2'}&lt;/P&gt;&lt;P&gt;Sample, this works:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;'payload'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'status'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and this does not:&lt;BR /&gt;&lt;BR /&gt;yield jsons.dumps({'payload': '','status': 200})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks Peter&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 30 Jun 2025 15:47:41 GMT</pubDate>
    <dc:creator>Schroeder</dc:creator>
    <dc:date>2025-06-30T15:47:41Z</dc:date>
    <item>
      <title>reply/response in PersistentServerConnectionApplication</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748964#M11978</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;how can I reply to the sending endpoint not using return as I want to keep the connection open?&lt;/P&gt;&lt;P&gt;My endpoint works as long as I respond via the return through the appserver but I do not want to close the connection. I tried using yield with json.dumps but then the appserver throws a serialization error.&lt;/P&gt;&lt;P&gt;Doing this async it also something the appserver does not like.&lt;/P&gt;&lt;P&gt;How can I do something like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;response {'a':'1'}&lt;/P&gt;&lt;P&gt;... do something&lt;/P&gt;&lt;P&gt;return {'a':'2'}&lt;/P&gt;&lt;P&gt;Sample, this works:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;SPAN&gt;'payload'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'status'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;200&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and this does not:&lt;BR /&gt;&lt;BR /&gt;yield jsons.dumps({'payload': '','status': 200})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks Peter&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Jun 2025 15:47:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748964#M11978</guid>
      <dc:creator>Schroeder</dc:creator>
      <dc:date>2025-06-30T15:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: reply/response in PersistentServerConnectionApplication</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748965#M11979</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237059"&gt;@Schroeder&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your restmap.conf have you set stream=true? I'm not sure if this is the only thing you would need to change but it could be a good starting point!&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.splunk.com/en/splunk-enterprise/administer/admin-manual/9.4/configuration-file-reference/9.4.3-configuration-file-reference/restmap.conf#:~:text=persist%22.%0A*%20Default%3A%20false-,stream%20%3D%20%3Cboolean%3E,-*%20Describes%20whether%20or" target="_blank"&gt;https://help.splunk.com/en/splunk-enterprise/administer/admin-manual/9.4/configuration-file-reference/9.4.3-configuration-file-reference/restmap.conf#:~:text=persist%22.%0A*%20Default%3A%20false-,stream%20%3D%20%3Cboolean%3E,-*%20Describes%20whether%20or&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;stream = &amp;lt;boolean&amp;gt;
* Describes whether or not splunkd sends the payload in the
request to the driver in a streaming fashion.
* A value of "true" means splunkd sends the payload in the
request to the driver in a stream, or multiple sequential requests.
* A value of "false" means splunkd sends the payload in the
request to the driver as a field of the original request.
* Only has effect if the 'scripttype' setting is set to "persist".
* Default: false&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 16:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748965#M11979</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-06-30T16:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: reply/response in PersistentServerConnectionApplication</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748974#M11980</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;No, I did not. Does that mean I could then use yield?&lt;/P&gt;&lt;P&gt;I have a hard way to find good examples for me use case.&lt;/P&gt;&lt;P&gt;//Peter&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2025 17:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748974#M11980</guid>
      <dc:creator>Schroeder</dc:creator>
      <dc:date>2025-06-30T17:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: reply/response in PersistentServerConnectionApplication</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748991#M11982</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/237059"&gt;@Schroeder&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to get this to work but unfortunately not managed to. It looks like this is designed for streamed payload being sent into the&amp;nbsp;persistconn/appserver.py rather than as a response to the browser.&lt;/P&gt;&lt;P&gt;Please let us know if you do manage to get anywhere with this though - Perhaps its possible with a custom driver = value, although there arent many examples of this online!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":glowing_star:"&gt;🌟&lt;/span&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Did this answer help you?&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;If so, please consider:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding karma to show it was useful&lt;/LI&gt;&lt;LI&gt;Marking it as the solution if it resolved your issue&lt;/LI&gt;&lt;LI&gt;Commenting if you need any clarification&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Your feedback encourages the volunteers in this community to continue contributing&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 06:09:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/reply-response-in-PersistentServerConnectionApplication/m-p/748991#M11982</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-07-01T06:09:42Z</dc:date>
    </item>
  </channel>
</rss>

