dagu
dagu copied to clipboard
Add `json` bool configuration option to HTTP executor
Overview
Add a format option to the HTTP executor configuration.
steps:
- name: a step
command: GET https://xxx
executor:
type: http
config:
format: json
output: DATA1
This will format the result as standard JSON, including the status code and response headers:
{
"status_code": 200,
"headers": [
"xxx": "yyy"
],
"body": {
"some_field": "some_value"
}
}
Additional Context https://github.com/dagu-dev/dagu/discussions/577#discussion-6755295
EDIT: I changed the field type from json: boolean to an format: string for potential future options.
@yohamta hi , can i try to work on this issue ?
Hi @halalala222, thank you so much! Yes, please go ahead. Really appreciated.