Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

req.body returns an empty object

/* 
if you are using multipart/form-data or
require a file upload from frontend you will need a multer as middleware 
for your post/patch requests, 
otherwise you can set your frontend to send application/json 
*/
 <form action="/" method="POST"enctype="application/json">

 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #returns #empty #object
ADD COMMENT
Topic
Name
6+4 =