Closed wrussell1999 closed 5 months ago
HttpRequest works well, the issue is in the way you send the data : From your Kestra Flow, you're sending a list of object :
defaults: |
[{"name": "Will", "job": "Developer Advocate"}]
While you send only an object in Postman :
Update your input to only send the object :
defaults: |
{"name": "Will", "job": "Developer Advocate"}
And you'll get the expected result :
Expected Behavior
When you make a POST request with
io.kestra.plugin.fs.http.Request
using a JSON body, you can access the response body through{{ outputs.task_id.body }}
.Actual Behaviour
When you make a POST request and access the output, the
body
is the same as the propertybody
used to make the request.Steps To Reproduce
Run the following flow:
The output will look like this (the same as the request body):
Documentation for the API
Postman is able to get a response body that matches the documentation.
Environment Information
Example flow
Example 1
Example 2