Getting Data In

How do I Configure a Workflow to POST JSON Encoded Data?

klopez30
Explorer

When creating a work flow with a POST request everything is automatically URL encoded according to the docs.

"Splunk software automatically HTTP-form encodes variables that it passes in POST link actions via URIs. This means you can include values that have spaces between words or punctuation characters."

The endpoint I am hitting expects this data to be in JSON format. Is there anyway to change this so that the request sends application/json instead?

1 Solution

svasani_splunk
Splunk Employee
Splunk Employee

You could do that by setting up the proxy server which listens for application/x-www-form-urlencoded type requests and post's application/json type data.
So you direct your request to proxy server which will do post request in application/json type.

View solution in original post

0 Karma

svasani_splunk
Splunk Employee
Splunk Employee

You could do that by setting up the proxy server which listens for application/x-www-form-urlencoded type requests and post's application/json type data.
So you direct your request to proxy server which will do post request in application/json type.

0 Karma

lakshman239
SplunkTrust
SplunkTrust

does this mean without a proxy server, we cannot post a json data to the application, natively?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...