We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
这里有一个bug,在send请求的时候没有用外部设置比如用的是axios设置的timeout和withCredentials去覆盖MockXMLHttpRequest中xhr里面的timeout和withCredentials属性,由于MockXMLHttpRequest中的xhr是open的时候创建的原生的XMLHttpRequest对象的实例,后面没有用设置的值去覆盖初始化的属性值,所以导致withCredentials属性在发送请求时始终为false
The text was updated successfully, but these errors were encountered:
这个问题很坑,花了不少时间才找到是mockjs问题,希望尽快修复这个问题
Sorry, something went wrong.
不知道题主解决问题了没有可以考虑使用以下全局配置
import Mock from 'mockjs'; Mock.XHR.prototype.withCredentials = true;
https://www.jianshu.com/p/fe5f775b541d
No branches or pull requests
这里有一个bug,在send请求的时候没有用外部设置比如用的是axios设置的timeout和withCredentials去覆盖MockXMLHttpRequest中xhr里面的timeout和withCredentials属性,由于MockXMLHttpRequest中的xhr是open的时候创建的原生的XMLHttpRequest对象的实例,后面没有用设置的值去覆盖初始化的属性值,所以导致withCredentials属性在发送请求时始终为false

The text was updated successfully, but these errors were encountered: