Request
The req object represents the HTTP request and has properties for the
request query string, parameters, body, HTTP headers, and so on. In this documentation and by convention,
the object is always referred to as req (and the HTTP response is res) but its actual name is determined
by the parameters to the callback function in which you’re working.
For example:
app.get('/user/:id', (req, res) => {
res.send(`user ${req.params.id}`);
});
But you could just as well have:
app.get('/user/:id', (request, response) => {
response.send(`user ${request.params.id}`);
});
The req object is an enhanced version of Node’s own request object
and supports all built-in fields and methods.
Properties
In Express 4, `req.files` is no longer available on the `req` object by default. To access uploaded files
on the `req.files` object, use multipart-handling middleware like [busboy](https://www.npmjs.
com/package/busboy), [multer](https://www.npmjs.com/package/multer),
[formidable](https://www.npmjs.com/package/formidable),
[multiparty](https://www.npmjs.com/package/multiparty),
[connect-multiparty](https://www.npmjs.com/package/connect-multiparty),
or [pez](https://www.npmjs.com/package/pez).