提交 39effbb2 编写于 作者: 雪洛's avatar 雪洛

docs: uni-cloud-router headers

上级 07795f18
...@@ -227,6 +227,18 @@ class PostController extends Controller { ...@@ -227,6 +227,18 @@ class PostController extends Controller {
} }
``` ```
#### 定制 URL 化返回响应头
```js
class PostController extends Controller {
async create() {
this.ctx.headers = {
'location': 'http://www.baidu.com'
}
}
}
```
### 服务(Service) ### 服务(Service)
业务逻辑封装的一个抽象层,有以下几个好处: 业务逻辑封装的一个抽象层,有以下几个好处:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册