mirror of
https://github.com/namibia/awesome-cheatsheets.git
synced 2024-12-22 10:08:54 +00:00
Request Method and Props
This commit is contained in:
parent
8008c44d49
commit
e775f8e675
@ -159,3 +159,23 @@ app.use('<admin dir>', admin)`; // Mounting a sub - app
|
||||
`app.use(function(req,res,next){
|
||||
res.send('Hey There!')
|
||||
})`
|
||||
|
||||
```Request```
|
||||
``Methods``
|
||||
|
||||
`req.param('name')`
|
||||
|
||||
``app.post('/', function (req, res, next) {
|
||||
console.log(req.body)
|
||||
res.json(req.body)
|
||||
})``
|
||||
|
||||
`console.dir(req.cookies.name)`
|
||||
|
||||
`console.dir(req.query.q)`
|
||||
|
||||
`console.log(req.route)
|
||||
res.send('GET')`
|
||||
|
||||
`console.dir(req.signedCookies.user)`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user