Need Assistance?

support@tutorialshub.in

Request & Response Objects

Inspecting the Request Object

ADVERTISEMENT
Express.js Free Lesson
5 min read
ADVERTISEMENT

The req object represents the incoming HTTP request and contains properties for the URL, HTTP headers, IP address, body payload, parameters, and cookies.

Key Request Properties

  • req.method — HTTP verb (GET, POST, etc.)
  • req.originalUrl — Full requested URL path including query string
  • req.headers — Object of HTTP request headers (or req.get('Header-Name'))
  • req.ip — Client IP address
  • req.body — Parsed request payload (requires body-parsing middleware)
ADVERTISEMENT
Hi, I'm Tuby! Here to help you