I was trying to use webhook as receiver of a html form. Testing it
curl -X POST -F 'email=john@foo.com' -F 'name=john' https://n8n.foo.com/webhook-test/1/form1/subscribe
unfortunately the content is not available
[
{
"body": {
},
"headers": {
"host": "...",
"x-forwarded-for": "...",
"connection": "close",
"content-length": "248",
"user-agent": "curl/7.64.1",
"accept": "*/*",
"content-type": "multipart/form-data; boundary=------------------------a5ee002ec1f2b7e1"
},
"query": {
}
}
]
What works is
curl -X POST -H 'Content-Type: application/json' -d '{"email":"john@foo.com","name":"john"}' https://n8n.foo.com/webhook-test/1/form1/subscribe
as it returns the data in the body
[
{
"body": {
"email": "john@foo.com",
"name": "john"
},
"headers": {
"host": "...",
"x-forwarded-for": "...",
"connection": "close",
"content-length": "41",
"user-agent": "curl/7.64.1",
"accept": "*/*",
"content-type": "application/json"
},
"query": {
}
}
]
Unfortunately that is not so useful for straight up html forms.
The next problem is that on a form submission the response should probably more than just
200 {"message":"Workflow got started."}
Now the question is: Should the webhook node be improved or should this be a different node altogether? Or is there another way that I missed?
Thoughts?