Axios

QuickTVUI 使用的是兼容官方1.7.9版本的 Axios

注意:

  • 兼容官方1.7.9版本的 API,点击查看 Axios API
  • 不支持XMLHttpRequest
  • 不支持使用nodehttp 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
      });