June 2014
Intermediate to advanced
696 pages
38h 52m
English
You pass a Request object to a route handler as the first parameter. The Request object provides data and metadata about the request, including the URL, headers, query string, and much more. It allows you to handle a request appropriately in your code.
Table 18.2 lists some of the most commonly used properties and methods available for the Request object.
Table 18.2 Properties and methods of the HTTP Request object
Listing 18.3 shows how to access the various parts of the Request object. The output in Figure 18.2 shows the actual values associated with a GET request.
Listing 18.3 express_request.js: Accessing properties ...
Read now
Unlock full access