Accepting JSON data

We have used POST parameters in our examples, but it's also possible to receive, parse, and process JSON input. (This can make it easier to call a REST service, because at the frontend it's very likely you'll be able to readily produce an object with the desired parameters for the request.) Use express.json() as middleware, and the request body will include the data from the JSON parameter. 

Go to http://expressjs.com/en/4x/api.html#express.json for more information on this.
..................Content has been hidden....................

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