change log v1.2.1 - liuyanzhi08/resource-axios GitHub Wiki
- support more params format
// support object which contains id attribute
Book.get({ id: 1 }).then(res => console.log(res));
Book.get({ _id: 1 }).then(res => console.log(res));
Book.update({ id: 1, name: 'foo' }).then(res => console.log(res));
Book.update({ _id: 1, name: 'foo' }).then(res => console.log(res));
Book.delete({ id: 1 }).then(res => console.log(res));
Book.delete({ _id: 1 }).then(res => console.log(res));
- methods alias
Book.create === Book.post
Book.update === Book.put
- params format check, if params format is wrong, throw error