Skip to content

Tag Archives: Express.js

The req.query property is an object containing the property for each query string parameter in the route. Syntax: req.query Parameter: No parameters. Return Value: String… Read More
The req.route property contains the currently-matched route which is a string. Syntax: req.route Parameter: No parameters. Return Value: Object Installation of express module: You can… Read More
The res.headersSent property is a boolean property that indicates if the app sent HTTP headers for the response. Syntax: res.headersSent Parameter: No parameters. Return Value:… Read More
The req.body property contains key-value pairs of data submitted in the request body. By default, it is undefined and is populated when you use a… Read More
The property holds the reference to the instance of the Express application that is using the middleware. Syntax: Parameter: No parameters. Return Value:… Read More
The req.signedCookies property contains signed cookies sent by the request, unsigned, and ready for use when using cookie-parser middleware. Syntax: req.signedCookies Parameter: No parameter Return… Read More
The res.locals property is an object that contains response local variables scoped to the request and because of this, it is only available to the… Read More
The req.cookies property is used when the user is using cookie-parser middleware. This property is an object that contains cookies sent by the request. Syntax:… Read More
The req.path property contains the path of the request URL. This property is widely used to get the path part of the incoming request URL.… Read More
The res.redirect() function redirects to the URL derived from the specified path, with specified status, a integer (positive) which corresponds to an HTTP status code.… Read More
The res.render() function is used to render a view and sends the rendered HTML string to the client.  Syntax:  res.render(view [, locals] [, callback]) Parameters:… Read More
The req.method property contains a string corresponding to the HTTP method of the request which can be either GET, POST, PUT, DELETE, etc. Syntax: req.method… Read More
The req.ips property contains an array of IP addresses specified in the X-Forwarded-For request header. It returns an array of IP addresses. Syntax: req.ips Parameter:… Read More
The req.ip property contains the remote IP address of the request. It is useful when the user wants the IP address of the incoming request… Read More
The req.hostname property contains the hostname which is derived from the Host HTTP header. It basically returns the hostname which is being supplied in the… Read More

Start Your Coding Journey Now!