The Express request object and its methods
This object is a wrapper for Node.js’ http.request object. The code, req.get(‘Content-Type’) ; returns the HTTP request header. The code, req.is(‘text/html’); returns ‘true’ if the MIME type is text/HTML. Some frequently used functions are listed below: accepts() acceptsCharsets() acceptsEncodings() acceptsLanguages() param() 1. 2. 3. 4. 5.