Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dcloudio/uni-app
Browse files Browse the repository at this point in the history
  • Loading branch information
anne-lxm committed Dec 14, 2020
2 parents 4087906 + 0ae1ec4 commit 205147d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/uniCloud/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,22 @@ content-length: 9897

<binary payload...>
```

##### 返回不同的状态码

如需重定向或返回4xx,5xx等自定义状态码等,可以使用如下方式

**注意:阿里云暂不支持在返回的header里面使用location**

```js
exports.main = function() {
return {
mpserverlessComposedResponse: false, // 使用阿里云返回集成响应是需要此字段为true
isBase64Encoded: false,
statusCode: 301,
headers: {
'location': 'http://www.baidu.com'
}
}
}
```

0 comments on commit 205147d

Please sign in to comment.