HTTP & Express interview questions

18 real HTTP & Express questions from the Node.js bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Middleware?

Junior
  1. A.the callback that passes control to the next middleware; next(err) jumps to error handlers
  2. B.sets the HTTP status code and sends a JSON response body
  3. C.params are route path segments like /users/:id; query is the ?key=value string
  4. D.an Express function (req, res, next) run in order to process a request
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Middleware — an Express object that groups related routes for modular mounting
  2. B.Middleware — sets the HTTP status code and sends a JSON response body
  3. C.Middleware — params are route path segments like /users/:id; query is the ?key=value string
  4. D.Middleware — an Express function (req, res, next) run in order to process a request
Reveal the answer + AI explanation — free account

4. What is Router?

Mid
  1. A.params are route path segments like /users/:id; query is the ?key=value string
  2. B.the callback that passes control to the next middleware; next(err) jumps to error handlers
  3. C.sets the HTTP status code and sends a JSON response body
  4. D.an Express object that groups related routes for modular mounting
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.Router — an Express function (req, res, next) run in order to process a request
  2. B.Router — an Express object that groups related routes for modular mounting
  3. C.Router — the callback that passes control to the next middleware; next(err) jumps to error handlers
  4. D.Router — sets the HTTP status code and sends a JSON response body
Reveal the answer + AI explanation — free account

7. What is next()?

Junior
  1. A.an Express function (req, res, next) run in order to process a request
  2. B.the callback that passes control to the next middleware; next(err) jumps to error handlers
  3. C.an Express object that groups related routes for modular mounting
  4. D.middleware with four arguments (err, req, res, next) that handles errors passed to next
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.next() — sets the HTTP status code and sends a JSON response body
  2. B.next() — middleware with four arguments (err, req, res, next) that handles errors passed to next
  3. C.next() — the callback that passes control to the next middleware; next(err) jumps to error handlers
  4. D.next() — an Express object that groups related routes for modular mounting
Reveal the answer + AI explanation — free account

10. What is req.params vs req.query?

Junior
  1. A.an Express object that groups related routes for modular mounting
  2. B.the callback that passes control to the next middleware; next(err) jumps to error handlers
  3. C.middleware with four arguments (err, req, res, next) that handles errors passed to next
  4. D.params are route path segments like /users/:id; query is the ?key=value string
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. A.req.params vs req.query — an Express object that groups related routes for modular mounting
  2. B.req.params vs req.query — params are route path segments like /users/:id; query is the ?key=value string
  3. C.req.params vs req.query — an Express function (req, res, next) run in order to process a request
  4. D.req.params vs req.query — the callback that passes control to the next middleware; next(err) jumps to error handlers
Reveal the answer + AI explanation — free account

13. What is res.status().json()?

Junior
  1. A.middleware with four arguments (err, req, res, next) that handles errors passed to next
  2. B.the callback that passes control to the next middleware; next(err) jumps to error handlers
  3. C.sets the HTTP status code and sends a JSON response body
  4. D.an Express object that groups related routes for modular mounting
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Junior
  1. A.res.status().json() — sets the HTTP status code and sends a JSON response body
  2. B.res.status().json() — an Express function (req, res, next) run in order to process a request
  3. C.res.status().json() — middleware with four arguments (err, req, res, next) that handles errors passed to next
  4. D.res.status().json() — the callback that passes control to the next middleware; next(err) jumps to error handlers
Reveal the answer + AI explanation — free account

16. What is Error-handling middleware?

Mid
  1. A.sets the HTTP status code and sends a JSON response body
  2. B.an Express object that groups related routes for modular mounting
  3. C.middleware with four arguments (err, req, res, next) that handles errors passed to next
  4. D.the callback that passes control to the next middleware; next(err) jumps to error handlers
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.Error-handling middleware — an Express object that groups related routes for modular mounting
  2. B.Error-handling middleware — middleware with four arguments (err, req, res, next) that handles errors passed to next
  3. C.Error-handling middleware — sets the HTTP status code and sends a JSON response body
  4. D.Error-handling middleware — the callback that passes control to the next middleware; next(err) jumps to error handlers
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice HTTP & Express free