Axios
QuickTVUI 使用的是兼容官方1.7.9
版本的 Axios
。
注意:
- 兼容官方
1.7.9
版本的 API,点击查看 Axios API
- 不支持
XMLHttpRequest
- 不支持使用
node
的http
https
库
集成
第一步、package.json
添加依赖库
@extscreen/es3-axios
第二步、引入Axios
import axios, {AxiosError} from '@extscreen/es3-axios';
示例
axios({
method: 'get',
url: 'https://quicktvui.com',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
// handle error
console.log(error);
}).finally(() => {
// always executed
});