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

PUT requests do not work #70

Open
Jamesking56 opened this issue Sep 18, 2022 · 1 comment
Open

PUT requests do not work #70

Jamesking56 opened this issue Sep 18, 2022 · 1 comment

Comments

@Jamesking56
Copy link
Contributor

Hi,

I have a route which accepts PUT only which I'd like to call in my Cypress test but it doesn't seem to work when I use cy.visit():

cy.visit({ route: 'my-route', params: { comment: 1 } });
```

I get this error:

```
CypressError: `cy.visit()` was called with an invalid method: `PUT`. Method can only be `GET` or `POST`.
```
@AbrahamBrookes
Copy link

use cy.request() instead: https://docs.cypress.io/api/commands/request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants