Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

response methods js express

//The res object represents the HTTP response that an Express app sends when it gets an HTTP request.

//In this documentation and by convention, the object is always referred to as res (and the HTTP request is req) but its actual name is determined by the parameters to the callback function in which you’re working.

For example:
app.get('/user/:id', function (req, res) {
  res.send('user ' + req.params.id)
})
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #response #methods #js #express
ADD COMMENT
Topic
Name
8+6 =