kestra-io / kestra

:zap: Workflow Automation Platform. Orchestrate & Schedule code in any language, run anywhere, 500+ plugins. Alternative to Zapier, Rundeck, Camunda, Airflow...
https://kestra.io
Apache License 2.0
13.1k stars 1.15k forks source link

Add support for allowfailed also on io.kestra.plugin.core.http.Download #6025

Closed syepes closed 1 day ago

syepes commented 1 day ago

Feature description

It would also be very useful to have this option in the core.http.download plugin also like its possible with the Request

CleanShot 2024-11-20 at 9  17 29

syepes commented 18 hours ago

@tchiotludo Great, so with this implemented now are we also going to be able to use the output (status code) just like with the Request?

- id: api_down
    type: io.kestra.plugin.core.http.Download
    allowfailed: true
    ...
  - id: ifError401
    type: io.kestra.plugin.core.flow.If
    condition: "{{ outputs.api_down.code == 401}}"
    ...
tchiotludo commented 18 hours ago

yes :gift:

https://github.com/kestra-io/kestra/blob/78f5ff2b7b085a9ad117e701ae0c59e1c9e7b27e/core/src/test/java/io/kestra/plugin/core/http/DownloadTest.java#L159