mercredi 26 juillet 2017

Test nodejs using postman: How to get req.user in postman

I'm using passport for register & login function. My API is like this:

router.post('/secret', ctr);
(req, res, next) => {
    if (req.user) {
        ...
    }
}

How to test this API using postman?

Aucun commentaire:

Enregistrer un commentaire