<?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 Who can tell me why the API POST for JSON doc times out - in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Who-can-tell-me-why-the-API-POST-for-JSON-doc-times-out/m-p/157461#M31900</link>
    <description>&lt;P&gt;This DOES NOT work:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:changeme "&lt;A href="https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex"&gt;https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex&lt;/A&gt;" -d {"somefield":"foobar”}&lt;/P&gt;

&lt;P&gt;This DOES work:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:changeme "&lt;A href="https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex"&gt;https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex&lt;/A&gt;" -d somefield=foobar&lt;/P&gt;

&lt;P&gt;Looking at the docs (&lt;A href="http://dev.splunk.com/view/SP-CAAADQT"&gt;http://dev.splunk.com/view/SP-CAAADQT&lt;/A&gt;), I think this is hinting at why the first request is broken "The -d/--post-data arguments for curl/wget need to be url-encoded, should they have characters needing escaping."&lt;/P&gt;

&lt;P&gt;Can someone tell me how a JSON data should be formatted to be submitted like this? Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 26 Apr 2015 14:40:27 GMT</pubDate>
    <dc:creator>himynamesdave</dc:creator>
    <dc:date>2015-04-26T14:40:27Z</dc:date>
    <item>
      <title>Who can tell me why the API POST for JSON doc times out -</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Who-can-tell-me-why-the-API-POST-for-JSON-doc-times-out/m-p/157461#M31900</link>
      <description>&lt;P&gt;This DOES NOT work:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:changeme "&lt;A href="https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex"&gt;https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex&lt;/A&gt;" -d {"somefield":"foobar”}&lt;/P&gt;

&lt;P&gt;This DOES work:&lt;/P&gt;

&lt;P&gt;curl -k -u admin:changeme "&lt;A href="https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex"&gt;https://0.0.0.0:8089/services/receivers/simple?source=mysource&amp;amp;index=myindex&lt;/A&gt;" -d somefield=foobar&lt;/P&gt;

&lt;P&gt;Looking at the docs (&lt;A href="http://dev.splunk.com/view/SP-CAAADQT"&gt;http://dev.splunk.com/view/SP-CAAADQT&lt;/A&gt;), I think this is hinting at why the first request is broken "The -d/--post-data arguments for curl/wget need to be url-encoded, should they have characters needing escaping."&lt;/P&gt;

&lt;P&gt;Can someone tell me how a JSON data should be formatted to be submitted like this? Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 26 Apr 2015 14:40:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Who-can-tell-me-why-the-API-POST-for-JSON-doc-times-out/m-p/157461#M31900</guid>
      <dc:creator>himynamesdave</dc:creator>
      <dc:date>2015-04-26T14:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Who can tell me why the API POST for JSON doc times out -</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Who-can-tell-me-why-the-API-POST-for-JSON-doc-times-out/m-p/157462#M31901</link>
      <description>&lt;P&gt;Sounds like a curl/shell issue to me. &lt;CODE&gt;curl -d "string"&lt;/CODE&gt; means you want something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl ... -d "foo bar"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As a result, I'd guess passing JSON might look like this (untested):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl ... -d "{\"somefield\":\"foobar\"}"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 26 Apr 2015 17:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Who-can-tell-me-why-the-API-POST-for-JSON-doc-times-out/m-p/157462#M31901</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-04-26T17:06:31Z</dc:date>
    </item>
  </channel>
</rss>

