<?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: webhook: unable to read POST data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/webhook-unable-to-read-POST-data/m-p/360262#M95941</link>
    <description>&lt;P&gt;I was having the same issue and was able to find the answer with the following StackOverflow article, excerpted here:&lt;/P&gt;

&lt;P&gt;The PHP superglobal $_POST is only is supposed to wrap data that is either&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;application/x-www-form-urlencoded (standard content type for simple form-posts) or&lt;/LI&gt;
&lt;LI&gt;multipart/form-data-encoded (mostly used for file uploads)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You need to fetch it yourself in &lt;STRONG&gt;RAW&lt;/STRONG&gt; format with:&lt;BR /&gt;
    file_get_contents('php://input') &lt;/P&gt;

&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/8893574/php-php-input-vs-post" target="_blank"&gt;https://stackoverflow.com/questions/8893574/php-php-input-vs-post&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:07:59 GMT</pubDate>
    <dc:creator>daxsmartpak</dc:creator>
    <dc:date>2020-09-30T00:07:59Z</dc:date>
    <item>
      <title>webhook: unable to read POST data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/webhook-unable-to-read-POST-data/m-p/360261#M95940</link>
      <description>&lt;P&gt;Hello Splunk users,&lt;BR /&gt;
 I'm sorry for this trivial question, but I can't understand.&lt;/P&gt;

&lt;P&gt;How can I read the HTTP POST data from webhook alert action?&lt;/P&gt;

&lt;P&gt;I wrote this webhook script:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?php

file_put_contents('postalert', print_r($_POST, true));

?&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But when it triggers, I only see an empty array as result:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
Array&lt;BR /&gt;
(&lt;BR /&gt;
)&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
I'm sad. Where am I wrong?&lt;/P&gt;

&lt;P&gt;Thank you very much&lt;/P&gt;

&lt;P&gt;Warm Regards&lt;BR /&gt;
Marco&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 13:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/webhook-unable-to-read-POST-data/m-p/360261#M95940</guid>
      <dc:creator>sistemistiposta</dc:creator>
      <dc:date>2017-06-21T13:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: webhook: unable to read POST data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/webhook-unable-to-read-POST-data/m-p/360262#M95941</link>
      <description>&lt;P&gt;I was having the same issue and was able to find the answer with the following StackOverflow article, excerpted here:&lt;/P&gt;

&lt;P&gt;The PHP superglobal $_POST is only is supposed to wrap data that is either&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;application/x-www-form-urlencoded (standard content type for simple form-posts) or&lt;/LI&gt;
&lt;LI&gt;multipart/form-data-encoded (mostly used for file uploads)&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;You need to fetch it yourself in &lt;STRONG&gt;RAW&lt;/STRONG&gt; format with:&lt;BR /&gt;
    file_get_contents('php://input') &lt;/P&gt;

&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/8893574/php-php-input-vs-post" target="_blank"&gt;https://stackoverflow.com/questions/8893574/php-php-input-vs-post&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:07:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/webhook-unable-to-read-POST-data/m-p/360262#M95941</guid>
      <dc:creator>daxsmartpak</dc:creator>
      <dc:date>2020-09-30T00:07:59Z</dc:date>
    </item>
  </channel>
</rss>

