1.0.4 • Published 2 years ago

@keenoho/js-request v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

js-lib

请求库, 直接引入文件, 不进行编译打包.

例子:

import { Request } from '@keenoho/js-request'

function processHeader() {
  const { user } = store.getState();
  return {
    'Content-Type': 'application/json;charset=UTF-8',
    'X-SESSION-ID': xxxxx,
  };
}

const requestService = new Request({
  axiosConfig,
  processHeader,
});

export const postMethod = requestService.postMethod.bind(requestService);
export const getMethod = requestService.getMethod.bind(requestService);
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