Releases: WhatAKitty/react-native-fetch-mock
Releases · WhatAKitty/react-native-fetch-mock
Url parameter for Rest API
Support
/api/path/{urlparams}
/api/path/{urlparams}/doaction
Complex request
Breaking Changes
old:
export default {
'/api/path': (options) => {
const all = Mock.mock({
'list|2': [{
'id|+1': 1,
'name': '@first @last',
'age|18-54': 1,
}]
}).list;
return Promise.resolve({
data: all,
});
}
}
new:
export default {
'/api/path': ({ method, url, params, headers }) => {
const all = Mock.mock({
'list|2': [{
'id|+1': 1,
'name': '@first @last',
'age|18-54': 1,
}]
}).list;
return Promise.resolve({
data: all,
});
}
}
0.1.3
- ignore url parameters
0.1.2
Modify example with new version 0.1.2
0.1.0 Release
First Release Version 🎉
Feature
- Support MockJS
Fix
- first url used always
First version
0.0.1 add test with parameters