Mocks api responses for AJAX (XHR) requests. (Postman for Frontend)
This is essentially built to increase productivity in frontend development. Made for developers, it lets users to define rules (url, method and mock response) to respond to AJAX calls.
Supports all common libraries like axios, superagent, XMLHttp, fetch etc.
Response can be a JSON object or an error.
It includes a JSON formatter to automatically convert your response in proper json format.
Each rule can be individually turned on/off to apply mocking.
There's a global power switch to turn off mocking all the rules at once.
The JSON object maker lets users to make the object in JS syntax and the formatter will convert it into valid JSON object with inverted commas and no trailing commas etc.
Features:
1. Urls can be absolute complete paths or regex enabled.
2. Labels for rules, so user can add different versions of same api
3. Delay in response
4. Test your app with success and error responses.
5. Add response headers along with mock response in the rule.
Steps for Users -
1. Define the api url, method, response JSON or error msg to be mocked.
2. Refresh the project and the ajax / fetch request will be mocked. Mocked url will disappear from network tab and appear in console if rule matches.
For any query or bug report or feature request - reach out to
[email protected].
This extension is made with love for fellow developers. If this helps you, support us with good reviews :))
Let's build stuff.