# 请求 & 响应
# 请求
上下文对象 (ctx
) 包含所有与请求相关的信息。它们可以通过 ctx.request
从 controllers 和 policies 访问
Strapi 在 ctx.request.body
传递 body
和在 files
通过 ctx.request.files
传递。
有关更多信息,请参阅 Koa request 文档 (opens new window).
# 响应
上下文对象 (ctx
) 包含用于管理服务器响应的值和函数的列表。它们可以通过 ctx.response
访问,从 controllers 和 policies。
有关更多信息,请参阅 Koa response 文档 (opens new window).
← Controllers Services →