-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Modify headers and status code but not stubbing response #190
Comments
Any progress on this stale issue? Should this at least be removed from the docs if it isnt a feature? |
I was trying to stub a 500 status code without stubbing the response itself and it wasnt working. The XHR kept returning a 200 response. Passing an empty array as response solved it. |
I feel that the docs are rather clear on the point that the
But, we are always looking for ways to improve our docs if there are some areas that were confusing you could point out. |
Like @fvanwijk, I am trying to get cypress to add some headers to certain XHR requests. If his example isn't how you do it, then how do you do it? |
You can't currently stub any options of a request unless you also stub the |
Oh, well maybe its worth explicitly putting that note in the docs? I seemed to think it was supported back when i was trying this 😀 |
I dont think its explicit enough as well :) |
I would agree that it would be a very useful feature. For example on our project we rely on the Cloudfront |
Any update on this feature? |
This is part of the work planned within #4176 which is currently in progress. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
The features requested in this issue are now possible as part of
Please see the If you encounter any issues or unexpected behavior while using |
I have an XHR request that responds normally with a status 200 and some data.
There is one case where the response is enriched with some header data. I want to simulate this case.
This is the mock setup:
The resulting call is a non stubbed call but also the
key: value
headers are missing. They are not missing when I add a stubbed response to the route config.The same happens with
status
.The text was updated successfully, but these errors were encountered: