Request Request

type: "io.kestra.plugin.fs.http.Request"

Request an http server

This task connects to http server, request the provided url and store the response as output

# Examples

Post request to a webserver

id: "request"
type: "io.kestra.plugin.fs.http.Request"
uri: "https://server.com/login"
headers: 
  user-agent: "kestra-io"
method: "POST"
formData:
  user: "user"
  password: "pass"

Post a multipart request to a webserver

id: "request"
type: "io.kestra.plugin.fs.http.Request"
uri: "https://server.com/upload"
headers: 
  user-agent: "kestra-io"
method: "POST"
contentType: "multipart/form-data"
formData:
  user: "{{ inputs.file }}"

Post a multipart request to a webserver while renaming the file sent

id: "request"
type: "io.kestra.plugin.fs.http.Request"
uri: "https://server.com/upload"
headers: 
  user-agent: "kestra-io"
method: "POST"
contentType: "multipart/form-data"
formData:
  user:
    name: "my-file.txt"
    content: "{{ inputs.file }}"

# Properties

# allowFailed

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

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

# body

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

The full body as string

# contentType

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

The request content type

# formData

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

The form data to be send

# headers

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

The header to pass to current 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

# uri

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

The fully-qualified URIs that point to destination http server

# Outputs

# body

  • Type: string

The body of the response

# code

  • Type: integer

The status code of the response

# formData

  • Type: object

The form data to be send

When sending a file, you can pass a map with a key 'name' for the filename and 'content' for the file content.

# headers

  • Type: object
  • SubType: array

The headers of the response

# uri

  • Type: string

The url of the current request

# Definitions

# RequestOptions

# basicAuthPassword

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

The basicAuth password.

# basicAuthUser

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

The basicAuth username.

# connectTimeout

  • Type: string
  • Dynamic:
  • Required:
  • Format: duration

The connect timeout.

# connectionPoolIdleTimeout

  • Type: string
  • Dynamic:
  • Required:
  • Default: 0.0
  • Format: duration

The idle timeout for connection in the client connection pool.

# defaultCharset

  • Type: Charset
  • Dynamic:
  • Required:
  • Default: UTF-8

Sets the default charset to use.

# followRedirects

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

Whether redirects should be followed.

# logLevel

  • Type: string

  • Dynamic:

  • Required:

  • Possible Values:

    • ALL
    • TRACE
    • DEBUG
    • INFO
    • WARN
    • ERROR
    • OFF
    • NOT_SPECIFIED

The level to enable trace logging at.

# maxContentLength

  • Type: integer
  • Dynamic:
  • Required:
  • Default: 10485760

Sets the maximum content length the client can consume.

# proxyAddress

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

The proxy to use.

# proxyPassword

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

The proxy password to use.

# proxyPort

  • Type: integer
  • Dynamic:
  • Required:

The proxy port to use.

# proxyType

  • Type: string

  • Dynamic:

  • Required:

  • Default: DIRECT

  • Possible Values:

    • DIRECT
    • HTTP
    • SOCKS

The proxy type to use.

# proxyUsername

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

The proxy user to use.

# readIdleTimeout

  • Type: string
  • Dynamic:
  • Required:
  • Default: 300.000000000
  • Format: duration

The default amount of time to allow read operation connections to remain idle.

# readTimeout

  • Type: string
  • Dynamic:
  • Required:
  • Default: 10.000000000
  • Format: duration

The default read timeout.

# SslOptions

# insecureTrustAllCertificates

  • Type: boolean
  • Dynamic:
  • Required:

Whether the client should disable checking of the remote SSL certificate.

Only applies if no trust store is configured. Note: This makes the SSL connection insecure, and should only be used for testing. If you are using a self-signed certificate, set up a trust store instead.