mirror of
https://github.com/tenrok/axios.git
synced 2026-06-11 18:02:32 +03:00
Refactored adapters loader; (#5277)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -100,8 +100,10 @@ function setProxy(options, configProxy, location) {
|
||||
};
|
||||
}
|
||||
|
||||
const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process';
|
||||
|
||||
/*eslint consistent-return:0*/
|
||||
export default function httpAdapter(config) {
|
||||
export default isHttpAdapterSupported && function httpAdapter(config) {
|
||||
return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
||||
let data = config.data;
|
||||
const responseType = config.responseType;
|
||||
|
||||
Reference in New Issue
Block a user