拦截请求并直接返回 Mock 数据,包括 XMLHttpRequest、fetch类接口
What is Mock:Intercept and directly return data?
"Mock:Intercept and directly return data" is a Chrome extension designed to intercept HTTP requests and directly return configured mock data, streamlining development and testing processes. It supports XMLHttpRequest and fetch, automatically generates mock data from Swagger 2.0 documentation, and accommodates GraphQL requests. Featuring multiple matching modes, configurable response delays, and support for import/export of configurations, it also offers type definitions for TypeScript. The extension operates in both English and Chinese based on the browser's language settings.
Extension stats
By: xiangmingcsyr
Users: 1,000+
Rating: 4.83
(6)
Creation date: 2023-06-20
Risk impact: Moderate risk impact
Risk likelihood: Moderate risk likelihood
Manifest version: 3
Permissions:
Host permissions:
Size: 498.69K
Email: xi*****@gmail.com
Ranking
# 27668
Other platforms
Not available on Firefox
Not available on Edge
Want to check extension ranking and stats more quickly for other Chrome extensions?
Install
Chrome-Stats extension
to view Chrome-Stats data as you browse the Chrome Web Store.
Extension summary
这是一款拦截对应请求并直接返回配置数据的 Mock 工具。它能帮助我们在开发过程中,减少对接口的依赖,尽可能保证我们能及更加清晰的逻辑来开发或者测试代码。
具体以下功能:
- 支持拦截和模拟使用 XMLHttpRequest 或 fetch 方法来请求的接口。
- 根据 swagger2.0 文档自动生成 Mock 数据。
- 支持 GraphQL 请求的 Mock。
- 允许对匹配的接口进行 Redirect 操作。
- 提供 contains、equals 和 regexp 三种匹配模式,以满足不同的接口匹配需求。
- 成功拦截匹配的接口,直接返回对应的 Mock 数据,无需进行实际的网络请求,Mock 时就不用等待接口返回 200 后才能继续进行后面的操作。
- 可以设置延迟返回时间,以模拟真实接口的响应。
- 支持导入、导出配置数据。
- 支持中英文两种语言。根据浏览器语言环境,自动显示对应的语言。
- 增加 mock 数据转 TypeScript 类型定义。
User reviews
好用,只是数据太大了后不支持,然后不支持mock file等,希望有后续支持。
I give 4 because, this extension able to do redirect to another url too.
Extension safety
Risk impact
Mock:Intercept and directly return data requires a few sensitive permissions. Exercise caution before installing.
Risk likelihood
Mock:Intercept and directly return data is probably trust-worthy. Prefer other publishers if available. Exercise caution when installing this extension.
Upgrade to see risk analysis details
Promo images
Similar extensions
Here are some Chrome extensions that are similar to Mock:Intercept and directly return data:
Apifox Browser Extension Mockiato: Mocks on the Fly! tweak: mock and modify HTTP requests Ajax Interceptor Tools Mock Proxy XSwitch ModResponse - Mock and replay API YMock: Mock API calls info Ajax Modifier 稀土掘金 MockMan - mock APIs Requestly - Intercept, Modify & Mock HTTP Requests
https://apifox.com
3.67
40,000+
mockiato.extension
4.75
496
https://tweak-extension.com
4.67
50,000+
Peng Chen
4.67
3,000+
jaredliu233
5.00
151
yize.shc
5.00
20,000+
https://modheader.com
4.57
10,000+
roc
5.00
29
ygyooo
4.75
20,000+
https://juejin.cn
3.57
100,000+
sudobird
3.94
2,000+
https://requestly.com
4.33
200,000+