2.0.0 (2019-11-18)
-
postRequestMiddleWare:
postRequestMiddleWareparameters has changed.To migrate the code follow the example below:
Before:
apiMod.registerPostRequestMiddleWare(apiMetas, res, next) { next(res); }
After:
apiMod.registerPostRequestMiddleWare(apiMetas, { data, response }, next) { console.log(data); next(response); }
v1.6.0 (2019-10-28)
- exports origin meta data by adding meta property to request.
v1.5.2 (2019-10-3)
- update dependencies and fix other potential security vulnerabilities
v1.5.1 (2019-6-13)
postRequestMiddletypo error
v1.5.0 (2019-6-13)
- add
globalPostRequestMiddleWarestatic method - add
registerPostRequestMiddleWareinstance method
v1.4.1 (2019-5-31)
- fix the bug that the
dataoption would be parsed first before processing inforeRequestHookfunction.
v1.4.0 (2019-5-29)
- ApiModule#
globalForeRequestMiddleWare: method name changed fromregisterForeRequestMiddleWare - ApiModule#
globalFallbackMiddleWare: method name changed fromregisterFallbackMiddleWare - registerFallbackMiddleWare(fallbackHook): change the second parameters to an object which contains
erroranddatafields. axiosdependence: you need to installaxiosdependence bynpm i axios -Sadditional, cause you can have better control of dependency version.
getAxios: now return an axios instance byaxios.create(config)
- adding unit test and coverage test.
- better error tips when you passing invalid values to
apiMetasor registering middlewares.
v1.3.2 (2019-4-2)
- fix default error handler would still be invoked when fallbackMiddle has been registered already.
v1.3.0 (2019-3-19)
baseConfig: add baseConfig for creating axios by default configuration.