webhook icon indicating copy to clipboard operation
webhook copied to clipboard

Option to pass stdin to the executing command

Open adnanh opened this issue 7 years ago • 2 comments

Since command arguments and environment variable content have limits on the size, we could implement option to pass request values via stdin.

Definition could look something like:

"pass-stdin-to-command": [
  { "source": "payload", "name": "something" },
  { "source": "string", "name": "blah blah" }
]

Questions

What format should we use to encode these values so scripts can easily figure out which content resembles which value

  1. We could use newline as value separator, but then we'd have to escape all newlines in the actual value.

  2. Other option would be something like HTTP is doing when sending multipart messages by using boundaries.

  3. Third option would be to encode data using JSON? Tools like jq make this an easy task to handle in shell scripts.

adnanh avatar Nov 06 '17 18:11 adnanh

My 2 cents would be to restrict this feature only the entire-payload. Smaller things could be passed in as args or env vars.

If not, then I would vote for your option 3, encode it as JSON

dcj avatar Nov 15 '17 22:11 dcj

My 2 cents would be to restrict this feature only the entire-payload.

:+1:

danihodovic avatar Dec 15 '20 19:12 danihodovic