but here when I try to do the same thing with a form-data type, there is no data in the req.body, it’s an empty object. I don’t know why.
thank you for helping me
I hope you figured it out.
The reason why is this because your presumed express server doesn’t parse multipart/form-data.
For it to parse this data you need to use something like multer.
So install multer, then in your main server file simple add the following.
This will attach multer middleware which will then parse your text multipart/form-data and reattach it to req.body which should now hold you desired data.