Answers for "using multiple http verbs on express path request"

0

using multiple http verbs on express path request

app.route('/book')
  .get(function (req, res) {
    res.send('Get a random book')
  })
  .post(function (req, res) {
    res.send('Add a book')
  })
  .put(function (req, res) {
    res.send('Update the book')
  })
Posted by: Guest on November-13-2020

Code answers related to "using multiple http verbs on express path request"

Code answers related to "Javascript"

Browse Popular Code Answers by Language