Skip to content

Tag Archives: Express.js

The req.stale property indicates whether the incoming request is stale, and this property is the opposite of req.fresh property. Syntax: req.stale Parameter: No parameters. Return… Read More
The req.params property is an object containing properties mapped to the named route “parameters”. For example, if you have the route /student/:id, then the “id”… Read More
The req.originalUrl property is much like req.url however, it retains the original request URL thereby allowing you to rewrite req.url freely for internal routing purposes.… Read More
The req.param() function basically returns the value of param name when present. When parameters are passed, then it can be accessed using this function.Syntax:   req.param(name… Read More
The res.json() function sends a JSON response. This method sends a response (with the correct content-type) that is the parameter converted to a JSON string… Read More
The req.baseUrl property is the URL path on which a router instance was mounted. The req.baseUrl property is similar to the mount path property of… Read More
The res.attachment() function is used to set the HTTP response Content-Disposition header field to ‘attachment’. If the name of the file is given as filename,… Read More
The res.set() function is used to set the response HTTP header field to value. To set multiple fields at once, pass an object as the… Read More
The res.jsonp() function is used to send a JSON response with JSONP support and this function is similar to the res.json() function except that it… Read More
The req.protocol property contains the request protocol string which is either HTTP or (for TLS requests) https. When the trust proxy setting does not evaluate… Read More
The res.vary() function is used to add the field to the Vary response header, if it is not there already. The Vary header indicates which… Read More
The res.append() function appends the specified value to the HTTP response header field and if the header is not already set then it creates the… Read More
The res.end() function is used to end the response process. This method actually comes from the Node core, specifically the response.end() method of HTTP.ServerResponse. Use… Read More
The property is an Boolean property that is true if a TLS connection is established else return false. Syntax: Return Value: It return… Read More
The res.send() function basically sends the HTTP response. The body parameter can be a String or a Buffer object or an object or an Array.… Read More

Start Your Coding Journey Now!