Can mock.js store data - Stack Overflow
PHPz
PHPz 2017-05-16 13:44:22
0
1
969

Mock.js can forge data and intercept ajax requests and return forged data. So I want to ask, does mock.js support updating data? For example, if I post a request to add a piece of data or modify a piece of forged data, can mock.js do it? If it can't be done, is it possible to build a simple mock server by yourself?

PHPz
PHPz

学习是最好的投资!

reply all(1)
phpcn_u1582

The storage you are talking about is not persistent storage. In this way, the data can be temporarily stored. Create a new temporary variable in mock.js and save it. As long as mock.js does not restart, the data will be there

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template