eleme-mock-server
v0.1.0
Published
Eleme Mock Server SDK
Downloads
4
Readme
Eleme Mock Server
The offical javascript sdk, based on the awesome axios.
Usage
npm i eleme-mock-server --save
then import in your project, Mock(cluster, config)
will return an axios instance, checkout the methods here.
- cluster [String]: your project's mock cluster.
- config [Object]: axios config, see the details here.
import Mock from 'eleme-mock-server';
Mock('your-mock-cluster', {
baseURL: 'https://some-domain.com/api/'
}).get('/user/e1emeb0t').then(result => {
}).catch(error => {
});