Express的五个重点对象
2023-06-27 14:40:22 7 举报
AI智能生成
Express的五个重点对象
作者其他创作
大纲/内容
res.app
res.headersSent
res.locals
Properties
res.json()
res.redirect()
res.status(code)
res.download()
使用它来定义服务器响应中的任何标准/非标准头。
res.append (res.append)
这专门用于定义Content-Type标头
res.type (res.type)
Methods
Response
router.all()
router.METHOD()
router.param()
router.route()
router.use()
Router
express.json()
express.raw()
express.Router()
express.static()
express.text()
express.urlencoded()
express()
app.locals
app.mountpath
mount
Events
app.all()
app.delete()
app.disable()
app.disabled()
app.enable()
app.enabled()
app.engine()
app.get()
app.listen()
app.METHOD()
app.param()
app.path()
app.post()
app.put()
app.render()
app.route()
app.set()
app.use()
Application
req.app
req.baseUrl
req.body
req.cookies
req.fresh
req.hostname
req.ip
req.ips
req.method
req.originalUrl
req.params
req.path
req.protocol
req.query
req.route
req.secure
req.signedCookies
req.stale
req.subdomains
req.xhr
req.accepts()
req.acceptsCharsets()
req.acceptsEncodings()
req.acceptsLanguages()
req.get()
req.is()
req.param()
req.range()
Request
Express的五个重点对象
0 条评论
回复 删除
下一页