Loading

Quipoin Menu

Learn • Practice • Grow

express-js / Express.js Form Data
mcq
Direction: Choose the correct option

Q1.

Which middleware is needed to handle form data submitted via POST with enctype="application/x-www-form-urlencoded"?
A. express.form()
B. express.json()
C. express.multipart()
D. express.urlencoded()
Direction: Choose the correct option

Q2.

Where can you access the parsed form data in a route handler?
A. req.query
B. req.form
C. req.params
D. req.body
Direction: Choose the correct option

Q3.

What middleware is used for handling multipart/form-data (file uploads)?
A. express.form()
B. body-parser
C. multer
D. express.multipart()
Direction: Choose the correct option

Q4.

If you forget to use express.urlencoded() for a form POST, what will req.body be?
A. undefined or empty
B. The parsed data
C. The raw data
D. An error
Direction: Choose the correct option

Q5.

How do you access a specific field named 'email' from a submitted form?
A. req.query.email
B. req.params.email
C. req.body.email
D. req.form.email