responseGenerator is a JavaScript function
body evaluated for every match. It receives the captured mock.request (and
mock.response when fetchOriginalResponse is set) and returns the response
body.
Intercept a network route and return a custom response.
responseGenerator is a JavaScript function
body evaluated for every match. It receives the captured mock.request (and
mock.response when fetchOriginalResponse is set) and returns the response
body.