Skip to content

Releases: WhatAKitty/react-native-fetch-mock

Url parameter for Rest API

07 May 14:32
Compare
Choose a tag to compare

Support
/api/path/{urlparams}
/api/path/{urlparams}/doaction

Complex request

05 May 16:57
Compare
Choose a tag to compare

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

17 Apr 03:03
Compare
Choose a tag to compare
  • ignore url parameters

0.1.2

15 Apr 14:13
Compare
Choose a tag to compare
Modify example with new version 0.1.2

0.1.0 Release

14 Apr 09:42
Compare
Choose a tag to compare

First Release Version 🎉

Feature

  • Support MockJS

Fix

  • first url used always

First version

06 Apr 15:58
Compare
Choose a tag to compare
First version Pre-release
Pre-release
0.0.1

add test with parameters