import httpRequestFactory from './httpRequestFactory';
const httpRequestsDebug = httpRequestFactory('debug'); // 返回 debug 环境的请求对象
const httpRequestsProduction = httpRequestFactory('production'); // 返回 production 环境的请求对象
// 使用 debug 环境的请求
httpRequestsDebug.get('/users')
.then((data) => console.log(data))
.catch((error) => console.error(error));
// 使用 production 环境的请求
httpRequestsProduction.get('/users')
.then((data) => console.log(data))
.catch((error) => console.error(error));
-
Notifications
You must be signed in to change notification settings - Fork 0
nutsyc/axios-tipbsy
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A wrapper based on Axios
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published