HttpRequest Node result has an unknown error

I used the API settings created by Postman as it is, but I received the following error message.

How do I fix the error?

Welcome to the community @ybsoft!

If it gets set to “RAW” it expects the “Headers” to be set to an actual JavaScript-Object.

So you can do the following:

{
  "nodes": [
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://webhook.site/31459474-92d7-4a29-864e-5ac92f1541f1",
        "responseFormat": "string",
        "jsonParameters": true,
        "options": {
          "bodyContentType": "raw",
          "fullResponse": true,
          "followRedirect": true
        },
        "bodyParametersJson": "{\"debug\": false}",
        "headerParametersJson": "={{JSON.parse('{\"connection\": \"keep-alive\"}')}}"
      },
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        550,
        730
      ]
    }
  ],
  "connections": {}
}
1 Like

@jan
Works fine.
Thank you.
You rock!

Great to hear. Have fun!