Describe the issue/error/question
Hi, I’m currently doing a POST request thanks to the http node. I setup my request first using postman, and to make the request working, I need the content of the body to be just a string. So I would like to put the body content type in “raw” but let the headers in json, or setup them in “raw” but I don’t know if it’s possible. So I setup my node but I get the error below :
What is the error message (if any)?
ERROR: Cannot create property ‘accept’ on string ‘{“content-type”: “application/x-www-form-urlencoded”, “x-rapidapi-host”: “canssens-seo-extraction-v1.p.rapidapi.com”, “x-rapidapi-key”: “my-private-key”}’
Please share the workflow
This is the node :
{
"nodes": [
{
"parameters": {
"requestMethod": "POST",
"url": "=https://canssens-seo-extraction-v1.p.rapidapi.com/seo/api/",
"jsonParameters": true,
"options": {
"bodyContentType": "raw"
},
"bodyParametersJson": "url=https://www.secretsdeloly.com",
"headerParametersJson": "{\"content-type\": \"application/x-www-form-urlencoded\", \"x-rapidapi-host\": \"canssens-seo-extraction-v1.p.rapidapi.com\", \"x-rapidapi-key\": \"my-private-key\"}"
},
"name": "seo-page1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
540,
2340
]
}
],
"connections": {}
}
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)
The API that I use : https://rapidapi.com/Canssens/api/seo-extraction/
Thanks Guys !
Share the output returned by the last node
Information on your n8n setup
- **n8n version: n8n cloud 0.158
- Database you’re using (default: SQLite):
- Running n8n with the execution process [own(default), main]:
- Running n8n via [Docker, npm, n8n.cloud, desktop app]: