you'll need middleware in order to parse the request and make it accessible in req.body. i've assumed you're using a version after 4.16 which introduced express.json() as middleware for this scenario. i'll update my answer if you're using an earlier version.

example using your code as a starter:

const express = require('express');
const app = express();

app.use(express.json());'/', (req, resp) => {


to explain, anything you post, aka let's say you posted the following object:

  fruit: 'apple',
  vegetable: 'onion'

after using the parser you'd access the posted data in req.body.fruit and req.body.vegetable.


ok, i found the problem. i deleted the axiosconfig from post, based on this source , and now this is the working code:

            { general: general, onesuggestion: onesuggestion }
        .then((res) => console.log("success, dictionary sent,", res))
        .catch((err) => {

thank you guys for your help.

Related Query

More Query from same tag