Skip to content

Commit

Permalink
docs: show a full example flow using options and formData
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-geller committed Feb 27, 2024
1 parent 2615dee commit 3d9a480
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/io/kestra/plugin/fs/http/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@
)
@Plugin(
examples = {
@Example(
title = "Execute a Kestra flow via an HTTP POST request authenticated with basic auth. To pass a `user` input to the API call, we use the `formData` property. When using form data, make sure to set the `contentType` property to `multipart/form-data`.",
full = true,
code = """
id: api_call
namespace: dev
tasks:
- id: basic_auth_api
type: io.kestra.plugin.fs.http.Request
uri: http://host.docker.internal:8080/api/v1/executions/dev/inputs_demo
options:
basicAuthUser: admin
basicAuthPassword: admin
method: POST
contentType: multipart/form-data
formData:
user: John Doe
"""
),
@Example(
title = "Send an HTTP POST request to a webserver",
code = {
Expand Down

0 comments on commit 3d9a480

Please sign in to comment.