I want to have a macro that opens or executes a URL, but with some HTTP headers for authentication. I cannot find where I can include these HTTP headers. Also, I cannot find where to add a JSON request body.
I tried looking into these forums and the documentation and nothing. Can someone point me on the right direction, please?
Probably the simplest way is to use an "Execute a Shell Script" within which you call curl.
There loads of info on the web on how to use curl for this kind of thing, and you can get it working in Terminal first. Once you've got the command working outside of KM you just need to work out how to pass in any variables you need into the action and get the results out, and there's plenty of examples of both in the Forum.
Apologies for the rather woolly answer. While it should point you in the right direction, if you want something more concrete in KM then I'm sure someone here can cook something up.