Formdata sent from reactjs frontend to nodejs backend is empty

//FrontEnd Code
const handleSubmit = async (e)=>{

  e.preventDefault();
 // console.log(bodyFormData)
 bodyFormData.append("email", email);
  bodyFormData.append("first_name", fName);
  bodyFormData.append("last_name", lName);
  bodyFormData.append("password", password);
  //Axios config
  const request = {
    method: "post",
    url: "",
    body: bodyFormData,
    headers: {
      'Access-Control-Allow-Origin':'*',
      " content-Type":"application/json", 
      "X-Request-Platform": platform,
     },
  };  
  try {
    console.log(bodyFormData, request.body)
    console.log(platform)
    //const hashpassword = await bcrypt.hash(e, 10)
    const res= await axios( request)
     console.log(res.data)
   
//Form Data shown attached  from console log in browser's console
FormData(4) { email → "gunter@ilmenau.com", first_name → "dfdadf", last_name → "sdfsdsdf", password → "test1212" }
 
App.js backend 
const cors = require('cors');

const bodyParser = require('body-parser')

const multer = require('multer');

const upload = multer();

const forms = multer();

mongodb_connection().then(() => {

console.log("App is connected to database");

});

(async () => {

await worker.start();

})();

const express = require("express");

const app = express();

app.use(cors());

app.use(express.json());

// for parsing application/json

app.use(bodyParser.json());

// for parsing application/xwww-

app.use(bodyParser.urlencoded({ extended: true }));

//form-urlencoded

// for parsing multipart/form-data

app.use(upload.array());

app.use(forms.array());

app.use(express.static('public'));

// parse application/x-www-form-urlencoded

However the formData always arrive empty

App is connected to database
Worker is connected to database
{}
Error creating user: Error: users validation failed: password: Cast to string failed for value "Promise { <pending> }" (type Promise) at path "password", email: Path `email` is required., first_name: Path `first_name` is required., last_na

PS: I have tweaked my headers and added and subtracted bodyparses a couple of times now am out of ideas

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!


I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thanks for the headsup, so I have a nodejs backend which am trying to make a post request to using axios and am collecting the data at the frontend with formdata , all checks indicates that the formdata is populated however when it gets to the backend the formdata is empty, I tried working on my headers however nothing worked so far… I am could use some expert opinion

If you use upload.none() with multer the body should contain the form text fields.

If you want to send JSON you can call Object.fromEntries(formData) and stringify it for the POST body: JSON.stringify(Object.fromEntries(formData))

thanks for suggestions, this body: JSON.stringify(Object.fromEntries(formData)) seems to format the formdata correctly , however is still arriving at the backend empty …