<?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: How do you send a raw HTTP Event Collector (HEC) value that contains a space? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-send-a-raw-HTTP-Event-Collector-HEC-value-that/m-p/386285#M69335</link>
    <description>&lt;P&gt;Have you tried using URL Encoding? &lt;/P&gt;

&lt;P&gt;As an example, you could POST a name to have it encoded by curl:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;curl --data-urlencode "apple=very red" &lt;A href="http://example.com" target="test_blank"&gt;http://example.com&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;
…which would send the following data in the actual request body:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;apple=very%20red&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The following site has a full explanation and examples of this with &lt;STRONG&gt;curl&lt;/STRONG&gt;: &lt;A href="https://ec.haxx.se/http-post.html"&gt;https://ec.haxx.se/http-post.html&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2018 22:15:10 GMT</pubDate>
    <dc:creator>ccl0utier</dc:creator>
    <dc:date>2018-11-15T22:15:10Z</dc:date>
    <item>
      <title>How do you send a raw HTTP Event Collector (HEC) value that contains a space?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-send-a-raw-HTTP-Event-Collector-HEC-value-that/m-p/386284#M69334</link>
      <description>&lt;P&gt;I am trying to send raw HEC messages and have Splunk auto parse the key/value pair.  For example, the following curl statement results in a field called foo with a value of bar... and a field called apple and a value of red:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k  &lt;A href="https://HOST:PORT/services/collector/raw" target="test_blank"&gt;https://HOST:PORT/services/collector/raw&lt;/A&gt; -H "Authorization: Splunk TOKEN" -d '"foo=bar, apple=red"'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, if I want to send a value with a space, such as apple=very red, it breaks down.  Single ticks don't work, escaped quotes don't work, and no quotes doesn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k  &lt;A href="https://HOST:PORT/services/collector/raw" target="test_blank"&gt;https://HOST:PORT/services/collector/raw&lt;/A&gt; -H "Authorization: Splunk TOKEN" -d '"foo=bar, apple=\"very red\""'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This must be possible.  Hopefully others have run into it.  Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 19:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-send-a-raw-HTTP-Event-Collector-HEC-value-that/m-p/386284#M69334</guid>
      <dc:creator>TonyLeeVT</dc:creator>
      <dc:date>2018-11-15T19:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you send a raw HTTP Event Collector (HEC) value that contains a space?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-send-a-raw-HTTP-Event-Collector-HEC-value-that/m-p/386285#M69335</link>
      <description>&lt;P&gt;Have you tried using URL Encoding? &lt;/P&gt;

&lt;P&gt;As an example, you could POST a name to have it encoded by curl:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;curl --data-urlencode "apple=very red" &lt;A href="http://example.com" target="test_blank"&gt;http://example.com&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;
…which would send the following data in the actual request body:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;apple=very%20red&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The following site has a full explanation and examples of this with &lt;STRONG&gt;curl&lt;/STRONG&gt;: &lt;A href="https://ec.haxx.se/http-post.html"&gt;https://ec.haxx.se/http-post.html&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 22:15:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-send-a-raw-HTTP-Event-Collector-HEC-value-that/m-p/386285#M69335</guid>
      <dc:creator>ccl0utier</dc:creator>
      <dc:date>2018-11-15T22:15:10Z</dc:date>
    </item>
  </channel>
</rss>

