CHAPTER 5
Express.js Request Object
The Express.js request object (req for short) is a wrapper for a core Node.js http.request object which is the Node.js representation of the incoming HTTP(S) request. In web, the request has these parts:
- Method: GET, POST or others
- URI: the location for example http://hackhall.com/api/posts/
- Headers: host: www.hackhall.com
- Body: content in the urlencoded, JSON or other formats
The Express.js request object has some additional neat functionality, but essentially it supports everything that the native http.request object can do.
For example, Express.js automatically adds support for query parsing, which is essential ...
Get Express.js Deep API Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.