应用截图





详细介绍
Hassle-free mocking of xhr and fetch calls.
Mocking your API responses like a pro. Parrot allows you to mock any asynchronous API call you want. It does this by patching both Fetch and XMLHttpRequest in such way that the actual call will always be done, but the response will be substituted by the mock data you specified.
💡 When to use this extension?
🔸 You are developing a front end that needs to connect to some back end API, but that back end API has not yet been developed or is down.
🔸 You want to give a live demo but the back end API needed is currently not available or broken.
🔸 You would not only like to test the happy flow, but would also like to see how your front end behaves given any possible alternate scenario or edge case.
🔸 You are experiencing a nasty bug but have no way of reproducing it easily using the real back end system. You would like to tweak the response to check if any unexpected response could be the cause of your issue.
💡 How to use this extension?
Just make sure you have the Parrot the network viewer (see below) option enabled and start your journey. Any API-call done will showup in the viewer and can be mocked by the click of one single button.
As an alternative, you can also start by pressing the "Define your mocks" button and then pressing the Add button to define a mocked response for a specific request. A line will show up on which you can define the HTTP verb/method and the URL-fragment of the request you would like to be mocked. The URL fragment is defined with a regular expression, allowing you to make any matching requirement as loose or strict as you would like it to be.
NB
In cases where the request also has a payload (like POST), the content of that payload can be used for determining if mocking should take place.
On that same line you can then define the status code of your response, the exact response type and the payload to be returned.
Once the extension detects the method/URL you expressed, t
Mocking your API responses like a pro. Parrot allows you to mock any asynchronous API call you want. It does this by patching both Fetch and XMLHttpRequest in such way that the actual call will always be done, but the response will be substituted by the mock data you specified.
💡 When to use this extension?
🔸 You are developing a front end that needs to connect to some back end API, but that back end API has not yet been developed or is down.
🔸 You want to give a live demo but the back end API needed is currently not available or broken.
🔸 You would not only like to test the happy flow, but would also like to see how your front end behaves given any possible alternate scenario or edge case.
🔸 You are experiencing a nasty bug but have no way of reproducing it easily using the real back end system. You would like to tweak the response to check if any unexpected response could be the cause of your issue.
💡 How to use this extension?
Just make sure you have the Parrot the network viewer (see below) option enabled and start your journey. Any API-call done will showup in the viewer and can be mocked by the click of one single button.
As an alternative, you can also start by pressing the "Define your mocks" button and then pressing the Add button to define a mocked response for a specific request. A line will show up on which you can define the HTTP verb/method and the URL-fragment of the request you would like to be mocked. The URL fragment is defined with a regular expression, allowing you to make any matching requirement as loose or strict as you would like it to be.
NB
In cases where the request also has a payload (like POST), the content of that payload can be used for determining if mocking should take place.
On that same line you can then define the status code of your response, the exact response type and the payload to be returned.
Once the extension detects the method/URL you expressed, t