lt-xhr
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

Introduction

axios + lru-cache

install

yarn add axios 
yarn add lru-cache 
yarn add lt-xhr

usage

import xhr, { Xhr } from 'lt-xhr'
class TestSrv {
  getList(id) {
    return xhr({
      url: `/test`,
      cache: true, // 缓存
      params: {
        id,
      },
    });
  }
}

Readme

Keywords

Package Sidebar

Install

npm i lt-xhr

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

527 kB

Total Files

24

Last publish

Collaborators

  • ltinyho