<?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: TA-Webtools: How to add headers in a POST request ? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432780#M53115</link>
    <description>&lt;P&gt;I am using this app &lt;A href="https://splunkbase.splunk.com/app/4146"&gt;https://splunkbase.splunk.com/app/4146&lt;/A&gt;&lt;BR /&gt;
The curl command is not picking up method=POST and always returning error 405 and &lt;BR /&gt;
{"error":{"detail":"GET method not supported for API","message":"Method not Supported"},"status":"failure"}&lt;/P&gt;

&lt;P&gt;I used this command&lt;BR /&gt;
| eval header="{\"Content-Type\":\"application/json\", \"Accept\":\"application/json\"}" &lt;BR /&gt;
| curl method=post uri= user= pass= headerfield= header&lt;/P&gt;

&lt;P&gt;Now I am not sure how to make a POST call to an external API from Splunk search. Every time it is being detected as GET.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2019 20:11:49 GMT</pubDate>
    <dc:creator>suser2019</dc:creator>
    <dc:date>2019-06-11T20:11:49Z</dc:date>
    <item>
      <title>TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432776#M53111</link>
      <description>&lt;P&gt;Hi there!&lt;/P&gt;

&lt;P&gt;I am trying to use TA-Webtools for start a automation flow. To do this I need to make a POST request as below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;curl -k -X POST -H "Content-type: application/json" --data '{"flowUuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx","inputs":{"A1": "B1","A2":"B2"}}' "https://server:8080/xxx/rest/v2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Using TA-Webtools I am using the search command below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my search&amp;gt; | curl method=POST data="{'flowUuid':'xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'}" uri=https://server:8080/xx/rest/v2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This command isn't working because are missing the header "Content-type: application/json".&lt;/P&gt;

&lt;P&gt;How can I include this? &lt;BR /&gt;
I think that I need to edit the python scripts, but how ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 17:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432776#M53111</guid>
      <dc:creator>duuhsousa</dc:creator>
      <dc:date>2018-10-22T17:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432777#M53112</link>
      <description>&lt;P&gt;See release version 1.1.0&lt;/P&gt;

&lt;P&gt;I couldnt make it work in the command like you wanted &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | curl data="JSON_DATA_HERE"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I had to make use of eval function to make the JSON field that gets passed to the request&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | makeresults count=1  | eval header="{\"content-type\":\"application/json\"}" | eval data="{\"test data\":None}" | curl uri=https://localhost:8089/services user=admin pass=changme debug=true headerfield=header datafield=data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know how it works for you&lt;/P&gt;

&lt;P&gt;&lt;A href="https://splunkbase.splunk.com/app/4146/"&gt;https://splunkbase.splunk.com/app/4146/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 04:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432777#M53112</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2018-12-28T04:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432778#M53113</link>
      <description>&lt;P&gt;Can you let us know if this works for you?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jan 2019 13:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432778#M53113</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-01-28T13:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432779#M53114</link>
      <description>&lt;P&gt;See this new app that goes well beyond my curl command: &lt;A href="https://splunkbase.splunk.com/app/4172/"&gt;https://splunkbase.splunk.com/app/4172/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 00:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432779#M53114</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-02-06T00:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432780#M53115</link>
      <description>&lt;P&gt;I am using this app &lt;A href="https://splunkbase.splunk.com/app/4146"&gt;https://splunkbase.splunk.com/app/4146&lt;/A&gt;&lt;BR /&gt;
The curl command is not picking up method=POST and always returning error 405 and &lt;BR /&gt;
{"error":{"detail":"GET method not supported for API","message":"Method not Supported"},"status":"failure"}&lt;/P&gt;

&lt;P&gt;I used this command&lt;BR /&gt;
| eval header="{\"Content-Type\":\"application/json\", \"Accept\":\"application/json\"}" &lt;BR /&gt;
| curl method=post uri= user= pass= headerfield= header&lt;/P&gt;

&lt;P&gt;Now I am not sure how to make a POST call to an external API from Splunk search. Every time it is being detected as GET.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 20:11:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432780#M53115</guid>
      <dc:creator>suser2019</dc:creator>
      <dc:date>2019-06-11T20:11:49Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432781#M53116</link>
      <description>&lt;P&gt;I was unable to make a POST using this application&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 20:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432781#M53116</guid>
      <dc:creator>suser2019</dc:creator>
      <dc:date>2019-06-11T20:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432782#M53117</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/738867/web-tools-add-on-ta-webtools-curl-command-throws-a.html"&gt;https://answers.splunk.com/answers/738867/web-tools-add-on-ta-webtools-curl-command-throws-a.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Does this link resolve your issue?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 23:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432782#M53117</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2019-06-11T23:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432783#M53118</link>
      <description>&lt;P&gt;Testing the splunk add on for service-now app..&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 04:30:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432783#M53118</guid>
      <dc:creator>suser2019</dc:creator>
      <dc:date>2019-07-10T04:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: TA-Webtools: How to add headers in a POST request ?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432784#M53119</link>
      <description>&lt;P&gt;Got it working&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 00:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/TA-Webtools-How-to-add-headers-in-a-POST-request/m-p/432784#M53119</guid>
      <dc:creator>suser2019</dc:creator>
      <dc:date>2019-07-17T00:26:13Z</dc:date>
    </item>
  </channel>
</rss>

