Use cases
Here are our recommended solutions for some common use cases to give you an idea of what ModResponse can do. You may find other use for ModResponse that are not listed here.
- Slow requests slowing down UI development
Do you have XHR requests that are taking 10 seconds to finish, and every time you make a small UI tweak you need to wait 10 seconds for the XHR request to finish to visualize your change? Using replay response, you can record and replay the slow XHR request. That way, you will only need to wait on the slow XHR request once. All subsequent requests to be served from the cached response within a few milliseconds. - Develop a UI that depends on a difficult to reproduce scenarios
Need to handle a 4XX or 5XX status code from an XHR request, or try out how your UI will behave with a very long string? Using replay response or stub response, you can modify the response body, status code, or response headers to simulate different scenarios that you need to handled. - Develop UI against unimplemented API endpoints
Are you a web developer who is blocked because an endpoint you depend on is not yet implemented? Using stub response, you can mock the API response so you can start developing against that endpoint. That way, you can develop the frontend while others implement the endpoint (as long as the actual implementation return the response in the same format). - Testing on production domains
Do you need to integrate with a third party platform that only works on your production domain? Using proxy request, you can reroute the request from your production domain to localhost or a dev domain, allowing you to test your changes on your production domain without the risk of breaking it. - Debug edge cases
Need to test how your app behaves when some resources takes too long to load, or when they fail to load due to network errors? With ModResponse, you can add artificial delay and simulate different network error conditions so you can debug and handle edge cases with ease.