![]() res.renderrenders an html response from a template res.json send a javascript object or array as a json response res.send will send a text, html or json request depending on what is passed to it Primarily made up of helper functions for different types of responses. ![]() The response object is an object that is used to help author the response to the request. req.method the method of the request as string req.body object key/values of the request body (parsed by the express.urlencoded or express.json middleware) req.query object with any key/values from a url query string req.params object with any route params req.headers object with the headers of the incoming request ![]() The request object represents the data from the incoming request and is passed to all middleware and route handlers. Enter fullscreen mode Exit fullscreen mode
0 Comments
Leave a Reply. |