# vue-request **Repository Path**: the-source-of-wind/vue-request ## Basic Information - **Project Name**: vue-request - **Description**: ⚡️ 一个能轻松帮你管理请求状态(支持SWR,轮询,错误重试,缓存,分页等)的 Vue 3 请求库。欢迎使用~ - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: https://www.attojs.com - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 31 - **Created**: 2021-04-02 - **Last Updated**: 2021-04-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README English | [简体中文](README-zh_CN.md)

VueRequest logo

VueRequest

⚡️ Vue 3 composition API for data fetching, supports SWR, polling, error retry, cache request, pagination, etc.

Coverage Status Size Version Languages License Star
## Features - 🚀 All data is reactive - 🔄 Interval polling - 🤖 Automatic error retry - 🗄 Built-in cache - 📠 Written in TypeScript - 🍃 Lightweight - 📦 Out of the box - 🔥 Interactive docs ## Documentation - [English](https://www.attojs.org/) - [中文](https://www.attojs.org/zh/) - [国内镜像](https://www.attojs.com/zh/) ## Install ```bash npm install vue-request # or with yarn yarn add vue-request ``` ### CDN ```html ``` It will be exposed to global as `window.VueRequest.useRequest` ## Usage ```tsx import { useRequest } from 'vue-request'; export default { setup() { const { data } = useRequest('api/user'); return () =>
{data.value}
; }, }; ``` ## TODO List If you have any cool features, please submit an issue for discussion - [x] Documentation - [x] Pagination - [x] Load More ## Thanks Thank them for inspiring us. - [vercel/swr](https://github.com/vercel/swr) - [alibaba/hooks](https://ahooks.js.org/hooks/async#userequest) ## License [MIT License](https://github.com/AttoJS/vue-request/blob/master/LICENSE) © 2020-present [AttoJS](https://github.com/AttoJS)