Logic
Manipulating response according the request.
Changing the response data with the power of JS! Once the request is matched and response is mapped, there is one more step before mock JSON response sends a response, that's passing data to function called logic.
logic receives request and data fetched as arguments, since data is passed by reference change in data object is sent as a response.
Here is an example:
Once the response is processed,
Last updated
Was this helpful?