Getting request parameters

Let's get to a basic problem: how do you get the request parameters? In our earlier example, in the Working with streams to process requests section of the previous chapter, we did it by hand, working with the request stream to get the body, and using parsing functions to extract the parameters. However, Express already provides some middleware you can use before any other function in your stack that needs parameters, either from the body or the URL itself. So in this recipe, let's see how we can access the request parameters, which is a very basic need.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.30.236