@umijs/request-record
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

request2type

a tool for generating type of request params/payload/query, works in http-proxy-middleware.

Install

$ yarn add @alipay/request-record --dev

Usage

In Umi

  1. add handler in umi config file.
import { defineConfig } from 'umi';

export default defineConfig({
  proxy: {
    '/api': {
      target: 'http://local.alipay.net:8090',
    },
  },
  requestRecord: {
    fromProxy: '/api',
  },
  plugins: ['@alipay/request-record/dist/cjs/umi-plugin'],
});
  1. start umi
$ umi record role=admin
  1. mock file output in ./mock/requestRecord.mock.js

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.45,579latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.45,579
1.1.329
1.1.23
1.1.10
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i @umijs/request-record

Weekly Downloads

5,611

Version

1.1.4

License

none

Unpacked Size

49.8 kB

Total Files

24

Last publish

Collaborators

  • xusd320
  • yifankakaxi
  • xierenyuan
  • stormslowly
  • xiefengnian
  • sorrycc
  • chenshuai2144
  • kuitos
  • peachscript
  • xiaohuoni