POST Request Node - Configuration with Headers

I’m having difficulty figuring out the correct setup for the POST Request Node.

For example, with the windows command prompt the following returns data:
curl “https://api.openfigi.com/v3/mapping” --request POST --header “Content-Type: application/json” --data “[{"idType":"ID_TRACE","idValue":"AGM5512024"}]”

However, my setup with the KNIME POST Request node is giving me a “400” error (bad request).
image

Here is my setup:



I have tried a variety of setups, but have not found the correct way.

Would anyone possibly know the way I could to setup this POST request node to work correctly?

1 Like

Hi @ebecker1

Since the endpoint is expecting a JSON, you request body needs to be formatted in such a way. Right now it’s not a valid JSON. You only need the content between the brackets.

[{
	"idType": "ID_TRACE",
	"idValue": "AGM5512024"
}]

It will return a 200 thereafter:

I can recommend using a JSON validtor tool for troubleshooting purposes. For example, https://jsonlint.com/

Hope this helps!

2 Likes

Hi, ArjenEX, this solves my question. Thank you for your help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.