yaml
type: "io.kestra.plugin.core.http.Download"

Download a file from a HTTP server.

This task connects to a HTTP server and copy a file to Kestra's internal storage.

Examples

Download a CSV file.

yaml
id: download
namespace: company.team

tasks:
  - id: extract
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/orders.csv

Properties

uri

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The fully-qualified URI that points to the HTTP destination

allowFailed

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

If true, allow a failed response code (response code >= 400)

body

  • Type: string
  • Dynamic: ✔️
  • Required:

The full body as a string

contentType

  • Type: string
  • Dynamic: ✔️
  • Required:

The request content type

failOnEmptyResponse

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: true

Should the task fail when downloading an empty file.

formData

  • Type: object
  • Dynamic: ✔️
  • Required:

The form data to be send

headers

  • Type: object
  • SubType: string
  • Dynamic: ✔️
  • Required:

The headers to pass to the request

method

  • Type: string
  • Dynamic:
  • Required:
  • Default: GET
  • Possible Values:
    • OPTIONS
    • GET
    • HEAD
    • POST
    • PUT
    • DELETE
    • TRACE
    • CONNECT
    • PATCH
    • CUSTOM

The HTTP method to use

options

The HTTP request options

sslOptions

The SSL request options

Outputs

code

  • Type: integer
  • Required:

headers

  • Type: object
  • SubType: array
  • Required:

length

  • Type: integer
  • Required:

uri

  • Type: string
  • Required:
  • Format: uri

Definitions

java.nio.charset.Charset

io.kestra.plugin.core.http.HttpInterface-RequestOptions

  • basicAuthPassword
    • Type: string
    • Dynamic: ✔️
    • Required:
  • basicAuthUser
    • Type: string
    • Dynamic: ✔️
    • Required:
  • connectTimeout
    • Type: string
    • Dynamic:
    • Required:
    • Format: duration
  • connectionPoolIdleTimeout
    • Type: string
    • Dynamic:
    • Required:
    • Default: 0
    • Format: duration
  • defaultCharset
    • Type: Charset
    • Dynamic:
    • Required:
    • Default: UTF-8
  • followRedirects
    • Type: boolean
    • Dynamic:
    • Required:
    • Default: true
  • logLevel
    • Type: string
    • Dynamic:
    • Required:
    • Possible Values:
      • ALL
      • TRACE
      • DEBUG
      • INFO
      • WARN
      • ERROR
      • OFF
      • NOT_SPECIFIED
  • maxContentLength
    • Type: integer
    • Dynamic:
    • Required:
    • Default: 10485760
  • proxyAddress
    • Type: string
    • Dynamic: ✔️
    • Required:
  • proxyPassword
    • Type: string
    • Dynamic: ✔️
    • Required:
  • proxyPort
    • Type: integer
    • Dynamic:
    • Required:
  • proxyType
    • Type: string
    • Dynamic:
    • Required:
    • Default: DIRECT
    • Possible Values:
      • DIRECT
      • HTTP
      • SOCKS
  • proxyUsername
    • Type: string
    • Dynamic: ✔️
    • Required:
  • readIdleTimeout
    • Type: string
    • Dynamic:
    • Required:
    • Default: 300
    • Format: duration
  • readTimeout
    • Type: string
    • Dynamic:
    • Required:
    • Default: 10
    • Format: duration

io.kestra.plugin.core.http.HttpInterface-SslOptions

  • insecureTrustAllCertificates
    • Type: boolean
    • Dynamic:
    • Required: