add ability to stream command output as a response

This commit is contained in:
lostsnow 2021-08-04 12:49:20 +08:00
parent 2a36f24269
commit afd20c569e
3 changed files with 44 additions and 9 deletions

View file

@ -570,6 +570,7 @@ type Hook struct {
ResponseMessage string `json:"response-message,omitempty"`
ResponseHeaders ResponseHeaders `json:"response-headers,omitempty"`
CaptureCommandOutput bool `json:"include-command-output-in-response,omitempty"`
StreamCommandOutput bool `json:"stream-command-output,omitempty"`
CaptureCommandOutputOnError bool `json:"include-command-output-in-response-on-error,omitempty"`
PassEnvironmentToCommand []Argument `json:"pass-environment-to-command,omitempty"`
PassArgumentsToCommand []Argument `json:"pass-arguments-to-command,omitempty"`