HTTP & Express interview questions

18 HTTP & Express questions from the Node.js bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

2. Which term means: "an Express function (req, res, next) run in order to process a request"?

Junior
  1. A.Middleware
  2. B.req.params vs req.query
  3. C.Error-handling middleware
  4. D.res.status().json()

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which term means: "an Express object that groups related routes for modular mounting"?

Mid
  1. A.next()
  2. B.Router
  3. C.req.params vs req.query
  4. D.Middleware

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which term means: "the callback that passes control to the next middleware; next(err) jumps to error handlers"?

Junior
  1. A.Router
  2. B.Middleware
  3. C.next()
  4. D.res.status().json()

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

11. Which term means: "params are route path segments like /users/:id; query is the ?key=value string"?

Junior
  1. A.next()
  2. B.req.params vs req.query
  3. C.Router
  4. D.Error-handling middleware

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which term means: "sets the HTTP status code and sends a JSON response body"?

Junior
  1. A.next()
  2. B.req.params vs req.query
  3. C.Error-handling middleware
  4. D.res.status().json()

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

17. Which term means: "middleware with four arguments (err, req, res, next) that handles errors passed to next"?

Mid
  1. A.next()
  2. B.res.status().json()
  3. C.req.params vs req.query
  4. D.Error-handling middleware

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every HTTP & Express question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers