I'm new user of Node and Express
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')
})
.delete(function (req, res) {
res.send('Delete the book')
});
for example, I have form HTML like:
<form action="/book" method="post">
...
</form>
When do I want to update the data, how does the Express know data should send for the PUT route also for Delete?
I could not send form data to PUT or Delete route. How I have to do that?