Hello,
Im creating a custom Http Post node that if given right parameters it gives back an certain value. Using postman everything works fine. This is probably not a thing for a node red forum but i didnt get any answer on other forums so I want to try here.
This is in postman . I need to get the result in javascript but dont know how to give those parameters.
Tried like this but it says bad request or unsupported media type :
const otherParams = { headers: { "content-type": "application/json; charset=UTF-8" }, body: { name: "Drugi" }, method: "POST", }; fetch(url, otherParams) .then((data) => console.log(data.json())) .then((res) => console.log(res));
Dont know why the code is formatted like this