Closed leo-schick closed 1 year ago
@jankatins any comments about the design?
I always did that directly via curl or python, so sounds fine.
I've not yet a clue on the stdin thingy, how would you use that?
I build a cloud function which validates a XML file against a schema and converts it to json. To process this logic through files in a directory the shell command would look roughly like this:
shell_command = f"{mara_storage.shell.read_file_command(...) \\\n" \
f" | {mara_pipelines.shell.http_request_command(...)} \\\n" \
f" | {mara_storage.shell.write_file_command(..)"
I plan to add a new
HttpRequestCommand
which shall run a HTTP/HTTPS command via curl.It should keep the output clean (using option
-s
) and fail when the request returns an error code (option-f
).Things to implement
-X
), usingGET
requests by default-H
)--data-binary @-
)Possible use cases
How to implement
http_request_command(...)
inmara_pipelines.shell
HttpRequestCommand
inmara_pipelines.commands.http