Node-fetch problems with POST requests
You need to await for json. var sentiments = await fetch(SEN_URL, {method: “POST”, body: {“data”: [{“text”: “I love you”}, {“text”: “I hate you”}]}}) //Here await sentiments.json() Also you can make request with JSON.stringify() for body. And it will be easier to manage your js object. Like this: var data = {data: [{text: “I love you”}, … Read more