Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

express post

app.post('/users', (req, res) => {
    const user = req.body;
    user.id = users.length + 1;
    users.push(user);
    res.send(user)
});
Source by expressjs.com #
 
PREVIOUS NEXT
Tagged: #express #post
ADD COMMENT
Topic
Name
8+3 =