美文网首页
react-native 网络请求

react-native 网络请求

作者: 成都reactnative | 来源:发表于2018-09-06 11:38 被阅读0次

react-native网络请求,使用fetch,

缺陷:

1.无超时时间,2没有取消请求功能

解决办法:

1.使用fetch,使用promse.race解决

2.rn-fetch-blob,包含了以上功能

3.ajax 使用传统web方法,也包含此功能

4.使用axios,功能强大,vue官方推荐

相关文章

网友评论

      本文标题:react-native 网络请求

      本文链接:https://www.haomeiwen.com/subject/xuatgftx.html