-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Overriding user-agent when using cy.request or cy.visit #3920
Conversation
Errors look unrelated to the changes. Can we try a rebuild ? |
Other issues regarding lowercase request headers: |
Hi, |
Thanks for the review @flotwig, corrected 👍 |
Looks good @AbdullahZN, but the same unit test is failing every time this PR runs, so that will need to be figured out before this can be merged. |
I'll dig into that. It's hard to debug though: tests are failing on my local develop branch 🤔 |
@flotwig It's ok now, tests are green 🍏 :) |
I think this will also fix #3719, since cy.visit() goes through request. Unless there's some other place where user-agent gets written. |
It will require a bit more work. I'll try to handle it in another PR |
@AbdullahZN I added a test in your branch for cy.visit user-agent, it appears to be passing with just the changes you've made: 3d1c832 We can close #3719 too then, nice |
Added possibility to override user-agent headers for
request.send
anndrequest.sendStream
Since headers can be provided by the client either in lowercase/uppercase/mix of both:
💡 I don't know where this kind of utils method should go, is it fine in the
request.coffee
?Closes #3873
Closes #3719