You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to propose extending webhook to support streaming command output.
The idea would be to add an extra option like stream_stdout_as_response which would mean the executed command would be streamed back rather then buffered up before being returned.
The protocol would be that a 200 OK response would be returned so long as the command wrote at least 1 byte of stdout before exiting. If the command exits non-zero without writing anything, then a regular error message would be returned.
My use-case here is using webhook to add large data export functionality to some of my docker containers - i.e. POST here to run pg_basebackup in the background and write the tar file back to the requester.
I'd like to propose extending webhook to support streaming command output.
The idea would be to add an extra option like
stream_stdout_as_response
which would mean the executed command would be streamed back rather then buffered up before being returned.The protocol would be that a 200 OK response would be returned so long as the command wrote at least 1 byte of stdout before exiting. If the command exits non-zero without writing anything, then a regular error message would be returned.
My use-case here is using
webhook
to add large data export functionality to some of my docker containers - i.e. POST here to run pg_basebackup in the background and write the tar file back to the requester.Update:
I've finished the draft of implementing this here: https://github.com/wrouesnel/webhook/tree/streaming_responses I'll submit a PR once I get the tests fixed and validated.
The text was updated successfully, but these errors were encountered: