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

fix: invalid json body mistakenly quoted #2449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GregoireBellon
Copy link

@GregoireBellon GregoireBellon commented Jun 12, 2024

Description

This pull request addresses the issue #2043.

It is also related to this one axios/axios#4034

In my opinion, Bruno shouldn't patch a faulty JSON string, since it restrains its range of use, notably when working with poorly designed APIs.

Moreover, other API clients (Postman, insomnia) don't have this behavior, so it could prevent one from adopting Postman.

The fix consists in adding a transformRequest to the Axios instance that prevents the default behavior if the content type is "application/json" and the body is a string.

@hotbinz
Copy link

hotbinz commented Jun 20, 2024

yes,you are right,please merge this request as soon as possible

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

Successfully merging this pull request may close these issues.

None yet

2 participants