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

whether to use the Fetch API or XHR based on browser support(根据浏览器是否支持fetch API 优先使用fetch来实现请求) #6283

Open
manbill opened this issue Mar 8, 2024 · 0 comments

Comments

@manbill
Copy link

manbill commented Mar 8, 2024

Is your feature request related to a problem? Please describe.

Recently, when using a service worker to listen for fetch events for cache handling, I found that the fetch events were not being triggered. I suspect this may be due to Axios exclusively using XMLHttpRequest (XHR) requests. I hope to prioritize checking whether fetch is supported before using it for requests.
最近使用service-worker 监听fetch事件来处理缓存,发现无法触发fetch事件,猜测是axios全部是xhr请求导致。希望能优先判断是否支持fetch来使用fetch请求

Describe the solution you'd like

I hope to prioritize checking whether fetch is supported before using it for requests
希望能优先判断是否支持fetch来使用fetch请求

Describe alternatives you've considered

No response

Additional context/Screenshots

No response

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

1 participant