-
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
cy.request fails with error incorrect header check #3971
Comments
I am having the same issue. |
instead of this: cy.request({
method: 'POST',
url: Cypress.config().baseApiUrl ,
body:{
TestUser: testUser
}
}) use this: cy.request('POST', Cypress.config().baseApiUrl, {TestUser: testUser}) for more information about the cy.request() method: https://docs.cypress.io/api/commands/request.html#Syntax |
I wasn't able to reproduce the issue with the information provided. We'll have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward. Please comment in this issue with a reproducible example and we will consider reopening the issue. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide. |
Current behavior:
I'm calling an API endpoint to run test by
cy.request
,here is my request code
When I try use Postman to verify it then I get correct result in a 200 with a json response.
but
cy.reques
t returns errorDesired behavior:
cy.request
should return a 200 for this requestExtra information
The response header likes
Complete error output
Versions
Cypress version 3.2.0
The text was updated successfully, but these errors were encountered: