venus-request
the core venus request components
Usage all avalable modules
export { default as adpterNtv } from './adapter-ntv';
export { default as adpterXhr } from './adapter-xhr';
export { default as HttpRequest } from './http-request';
export { default as HttpRequestRest } from './http-request-rest';
export { default as HttpRequestRoute } from './http-request-route';
export { default as interface } from './interface';
export { default as request } from './request';
export { default as useAjaxTime } from './use-ajax-time';
支持middleware 执行顺序如下:
request middleware-->dispatchRequest(adapter(transformRequest,transformResponse))-->response middleware
Webpack配置优化
modularImport: [{
'libraryName': 'venus-utils',
'libraryDirectory': 'esm',
}, {
'libraryName': 'venus-request',
'libraryDirectory': 'esm',
}],