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

Bad body encoding in cy.request #19115

Closed
jean9696 opened this issue Nov 25, 2021 · 4 comments · Fixed by #19239
Closed

Bad body encoding in cy.request #19115

jean9696 opened this issue Nov 25, 2021 · 4 comments · Fixed by #19239
Labels
topic: cy.request Issues related to cy.request command topic: network type: bug type: regression A bug that didn't appear until a specific Cy version release v9.1.0 🐛 Issue present since 9.1

Comments

@jean9696
Copy link

Current behavior

Body is encoding chars like '~' into hex chars ( \x7e)

Desired behavior

Body sent should be { key: '~'} without encoding

Test code to reproduce

    cy.request({ method: 'POST', body: { key: '~'}, 'url': 'https://www.google.com'})

Cypress Version

9.1.0

Other

I thank you for what you do at Cypress ! I'm facing the issue described here since the v9.1, is it a bug or is it what you wanted? 😬

Thanks for your time !

@jean9696 jean9696 changed the title Bad JSON encoding in cy.request Bad body encoding in cy.request Nov 25, 2021
@Narretz
Copy link
Contributor

Narretz commented Nov 25, 2021

Looks like a duplicate of #19084

@chrisbreiding
Copy link
Contributor

This seems to be a regression in 9.1.0.

Similar issues using different commands:

@chrisbreiding chrisbreiding added topic: cy.request Issues related to cy.request command topic: network type: bug type: regression A bug that didn't appear until a specific Cy version release labels Dec 2, 2021
@chrisbreiding chrisbreiding added the v9.1.0 🐛 Issue present since 9.1 label Dec 2, 2021
@cypress-bot cypress-bot bot added the stage: needs review The PR code is done & tested, needs review label Dec 3, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Dec 3, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 3, 2021

The code for this is done in cypress-io/cypress#19239, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 4, 2021

Released in 9.1.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v9.1.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: cy.request Issues related to cy.request command topic: network type: bug type: regression A bug that didn't appear until a specific Cy version release v9.1.0 🐛 Issue present since 9.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants