The Connect.js very terse documentation says methodOverride
Provides faux HTTP method support.
What does that mean? The obvious Google search is less than helpful. Why is methodOverride useful?
The Connect.js very terse documentation says methodOverride
Provides faux HTTP method support.
What does that mean? The obvious Google search is less than helpful. Why is methodOverride useful?
DELETE and PUT, methodOverride is for that.app.delete and app.put in Express instead of using app.post all the time (thus more descriptive, verbose):Backend:
// the app
app.put('/users/:id', function (req, res, next) {
// edit your user here
});
Client logic:
// client side must be..
<form> ...
<input type="hidden" name="_method" value="put" />
</form>