API Response Simulator
大小:1.62MiB版本:v 0.2.0更新时间:2021-12-21
Simulate API response to test your app's behavior
API Response Simulator 的使用方法详解,最全面的教程
API Response Simulator 描述:
用户数:1000
分类:开发者工具插件
扩展大小:1.62 MiB
最后更新时间:2021-12-21
版本:v 0.2.0
API Response Simulator 插件简介:
这是来自Chrome商店的 API Response Simulator 浏览器插件,您可以在当前页面下载它的最新版本安装文件,并安装在Chrome、Edge等浏览器上。
API Response Simulator插件下载方法/流程:
点击下载按钮,关注“扩展迷Extfans”公众号并获取验证码,在网页弹窗中输入验证码,即可下载最新安装文件。
API Response Simulator插件安装教程/方法:
(1)将扩展迷上下载的安装包文件(.zip)解压为文件夹,其中类型为“crx”的文件就是接下来需要用到的安装文件
(2) 从设置->更多工具->扩展程序 打开扩展程序页面,或者地址栏输入 Chrome://extensions/ 按下回车打开扩展程序页面
(3) 打开扩展程序页面的“开发者模式”
(4) 将crx文件拖拽到扩展程序页面,
完成安装如有其它安装问题,
请扫描网站底部二维码与客服联系如有疑问请参考:
https://www.extfans.com/installation/The API Response Simulator Chrome Extension allows you to simulate backend APIs in order to test how your application handle API certain response.
Generally, if you want to test how frontend behaves when backend API returns 2xx, 4xx or 5xx status codes, there are two options:
- If you control the backend, you can patch your backend code and manually return 2xx/4xx/5xx status codes from API methods.
- If you don't control the backend, you can patch your frontend code with some debug statements to verify the behavior.
Neither of which is an elegant approach.
The API Response Simulator Chrome Extension allows you to map backend API endpoints to the responses you want to simulate for your application.
Internally it patches browser's native XMLHttpRequest API.
Once you've installed the extension, follow the steps to operate it:
- Click on the ! icon at right top of the browser and switch on the extension.
- Click on the OPTIONS button. It'll open a page where you can supply rules with:
- The combination of URL and HTTP verb
- The response status code
- The response value
- You can also edit/delete your rules
Note: Please ensure you turn off the extension after its use. Leaving this extension on might hijack and break your API calls due to the nature of its implementation.
Design Credit:
Name: Jainul Abedin
LinkedIn: https://www.linkedin.com/in/jainul-abedin-4148b816
Email: jainulmca@gmail.com