request.md 632 字节
Newer Older
D
DCloud_LXH 已提交
1 2 3 4
## uni.request(param) @request

<!-- UTSAPIJSON.request.description -->

W
x  
wanganxp 已提交
5 6 7 8
request方法支持泛型,可将服务器的json数据转为自定义的type。

由于json在强类型语言中无法像js那样使用,如果您不熟悉ts中type+泛型来格式化服务器返回的数据,那么需要点这里阅读[request的教程](../tutorial/request.md)

D
DCloud_LXH 已提交
9 10 11 12 13 14 15 16 17 18
<!-- UTSAPIJSON.request.param -->

<!-- UTSAPIJSON.request.returnValue -->

<!-- UTSAPIJSON.request.compatibility -->

<!-- UTSAPIJSON.request.tutorial -->

<!-- UTSAPIJSON.general_type.name -->

W
x  
wanganxp 已提交
19 20 21 22
<!-- UTSAPIJSON.general_type.param -->

## tips
- uts中暂不支持arraybuffer