4.0.0-alpha.2 • Published 9 months ago

@maketribe/request v4.0.0-alpha.2

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

特性

  • 基于 axios 进行的封装
  • 对公司的请求签名逻辑进行了封装
  • 对于不同平台的请求进行了封装
  • 数据视图便捷查询工具(DVQueryable)

安装

使用 pnpm 导入:

$ pnpm add @maketribe/request

安装完成可以开始使用:

import { WebHttpRequest, UniHttpRequest } from "@maketribe/request";

示例

发送一个 post 请求

import { WebHttpRequest } from "@maketribe/request";

const request = new WebHttpRequest({
  appID: "test", // 应用对应的appID
});

request.post("/api/test", { a: 1 });

取消一个请求

import { WebHttpRequest, CancelToken } from "@maketribe/request";

const request = new WebHttpRequest({
  appID: "test", // 应用对应的appID
});

let canceler;
request.post(
  "/api/test",
  { a: 1 },
  {
    cancelToken: new CancelToken((c) => {
      canceler = c;
    }),
  }
);
// 取消请求
canceler();
4.0.0-alpha.2

9 months ago

3.2.5

10 months ago

4.0.0-alpha.1

11 months ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

3.2.2

12 months ago

3.2.1

1 year ago

3.2.0

1 year ago

3.2.4

11 months ago

3.2.3

12 months ago

2.0.3

1 year ago

2.0.2

1 year ago

1.1.15

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.12

2 years ago

1.1.11

2 years ago

1.1.10

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago