Install
bash
pnpm add @fast-china/axios axiosInstall the platform polyfills in a mini-program project:
bash
pnpm add miniprogram-formdata miniprogram-blobCDN
The jsDelivr entry uses dist/index.global.min.js. Load Axios first, then access this SDK through the FastAxios global:
| Resource | jsDelivr |
|---|---|
axios@1.8.1/dist/axios.min.js | jsDelivr |
@fast-china/axios/dist/index.global.min.js | jsDelivr |
html
<script src="https://cdn.jsdelivr.net/npm/axios@1.8.1/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fast-china/axios/dist/index.global.min.js"></script>
<script>
FastAxios.createFastAxios({
baseUrl: "https://api.example.com",
requestCipher: false,
});
FastAxios.axiosUtil.request({
url: "/users/1",
method: "get",
requestType: "query",
});
</script>The CDN build is browser-only; uni-app and the Vite/Webpack plugins must use package-manager imports.
