HTTP Task of type POST doesn't get body from request
Hi, I created a simple HTTP Task of type POST which passes the workflow's input as the body param. When I trigger the workflow, Conductor does call the endpoint, but it doesn't pass the body.
I suspect that this is a bug, but if not I would appreciate your help understanding what am I missing.
In the conductor UI, I can see that the Task input looks good:
{
"http_request": {
"uri": "http://localhost:4800/date-to-year",
"method": "POST",
"contentType": "application/json",
"body": {
"date": "1800-01-01"
}
}
}
workflow definition:
{
"name": "liran-date-to-year-rest-post",
"description": "Gets date and returns year from it",
"tasks": [
{
"name": "liran-task",
"taskReferenceName": "liran-task",
"inputParameters": {
"http_request": {
"uri": "http://localhost:4800/date-to-year",
"method": "POST",
"contentType": "application/json",
"body": "${workflow.input}"
}
},
"type": "HTTP"
}
],
"outputParameters": {
"finalYear": "${liran-task.output.response.body.year}"
},
"schemaVersion": 2
}
execution example:
curl -X POST
http://localhost:8080/api/workflow/liran-date-to-year-rest-post
-H 'Content-Type: application/json'
-d '{"date": "1800-01-01"}'
I also tried to define the workflow with constant body
"inputParameters": {
"http_request": {
"uri": "http://localhost:4800/date-to-year",
"method": "POST",
"contentType": "application/json",
"body": {"date": "2000-01-01"}
}
just for the test to see if my endpoint gets the body.. but still it didn't thank you!
Can you let me know where did you configure your workflow definition, so that the conductor server will instantiate?
Sorry, I didn't understand your question.. What do you mean by "where"?
On Sat, Aug 4, 2018, 20:01 dileepkeely [email protected] wrote:
Can you let me know where did you configure your workflow definition, so that the conductor server will instantiate?
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/Netflix/conductor/issues/673#issuecomment-410463174, or mute the thread https://github.com/notifications/unsubscribe-auth/ACx0Kg8kGBBJ5T-3ca-D9KvqeSa7WzN8ks5uNdOCgaJpZM4Vaesj .
--
Sent from my phone
I am facing same issue in v2.25.9, any suggestion would be great.