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

有个bug,MockXMLHttpRequest中XHR的属性withCredentials始终为false #300

Open
DevilishMan opened this issue Jun 16, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@DevilishMan
Copy link

commented Jun 16, 2018

这里有一个bug,在send请求的时候没有用外部设置比如用的是axios设置的timeout和withCredentials去覆盖MockXMLHttpRequest中xhr里面的timeout和withCredentials属性,由于MockXMLHttpRequest中的xhr是open的时候创建的原生的XMLHttpRequest对象的实例,后面没有用设置的值去覆盖初始化的属性值,所以导致withCredentials属性在发送请求时始终为false
image

@DevilishMan DevilishMan changed the title 有个bug,MockXMLHttpRequest中的withCredentials始终为false 有个bug,MockXMLHttpRequest中XHR的属性withCredentials始终为false Jun 16, 2018

@ijse

This comment has been minimized.

Copy link

commented Oct 3, 2018

这个问题很坑,花了不少时间才找到是mockjs问题,希望尽快修复这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.