Feedback
Got feedback? We want it! Submit your comments and suggestions for our community here.

webaddons curl json data

mrnobita
Observer

Hi,

When i post a json data and the data is an object, it doesn't post this data in json format, it post the data in the normal post format: variable=value.

How can we force it to post as json format?

splunkwebaddons json.png

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @mrnobita 

Unfortunately this is not possible, the actual code behind this custom command uses python request and the payload is sent as the "data" parameter, and cannot be changed to the "json" parameter without modifying the source of the app.

https://github.com/bentleymi/ta-webtools/blob/32481b43f1162c061ec48ad9b7464645f27ec428/TA-webtools/b...

r = requests.post(uri,data=payload,verify=True,cert=cert,headers=headers,timeout=timeout)

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...