Express.js Request Complete Reference

Last Updated : 31 Aug, 2026

Express.js provides a request object (req) that contains information about the incoming HTTP request, such as request parameters, query strings, headers, cookies, and other request details. It also provides methods for handling content negotiation, request headers, and other common HTTP operations.

Express.js Request Properties

Express.js Request Methods:

  • Express.js req.accepts() Function: The req.accepts() function checks whether the specified content types are acceptable based on the request's Accept HTTP header. It returns the best matching content type, or false if none of the specified types is acceptable.
  • Express.js req.acceptsCharsets() Function: The req.acceptsCharsets() function checks whether the specified character sets are acceptable based on the request's Accept-Charset HTTP header. It returns the first matching character set, or false if none of the specified character sets is acceptable.
  • Express.js req.acceptsEncodings() Function: The req.acceptsEncodings() function checks whether the specified content encodings are acceptable based on the request's Accept-Encoding HTTP header. It returns the first matching encoding, or false if none of the specified encodings is acceptable.
  • Express.js req.acceptsLanguages() Function: The req.acceptsLanguages() function checks whether the specified languages are acceptable based on the request's Accept-Language HTTP header. It returns the first matching language, or false if none of the specified languages is acceptable.
  • Express.js req.get() Function: The req.get() function returns the value of the specified HTTP request header. Header names are case-insensitive.
  • Express.js req.is() Function: The req.is() function checks whether the incoming request's Content-Type matches the specified MIME type. It returns the matching type when found, or false when there is no match.
Comment