Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

希望能加入对fetch的支持 #121

Open
ItoshikiNozomu opened this issue Jun 17, 2016 · 6 comments
Open

希望能加入对fetch的支持 #121

ItoshikiNozomu opened this issue Jun 17, 2016 · 6 comments

Comments

@ItoshikiNozomu
Copy link

现在正在结合wepack使用whatwg-fetch模块,希望能够支持

@cdoneshot
Copy link

同,希望能加入对fetch的支持

@xjcloudy
Copy link

+1。fetch 目前大部分浏览器已经支持fetch api 了。

@bytemofan
Copy link

+1

1 similar comment
@monvhh
Copy link

monvhh commented Aug 28, 2017

+1

@mrdulin
Copy link

mrdulin commented Dec 19, 2017

+10086

@zjffun
Copy link

zjffun commented Jun 15, 2019

貌似作者已经不维护了,下面是一个支持拦截 fetch 的版本 zjffun/Mock-support-intercept-fetch

使用的话:

npm install @zjffun/mockjs

fetch 的拦截还是比较好实现的,因为拦截后返回 resolve 为 response 对象(通过 Response - Web APIs | MDN 创建)的 promise 对象就行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants