From 3d9a4800c3eb044fc7c2610b34abf5ec309ed281 Mon Sep 17 00:00:00 2001 From: Anna Geller Date: Tue, 27 Feb 2024 22:22:05 +0100 Subject: [PATCH] docs: show a full example flow using options and formData --- .../io/kestra/plugin/fs/http/Request.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/main/java/io/kestra/plugin/fs/http/Request.java b/src/main/java/io/kestra/plugin/fs/http/Request.java index c0f2d56..67730a7 100644 --- a/src/main/java/io/kestra/plugin/fs/http/Request.java +++ b/src/main/java/io/kestra/plugin/fs/http/Request.java @@ -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 = {