-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
0.21.2 has a breaking change with pre-stringified JSON request body #4018
Comments
minimum server to listen: const express = require("express");
const bodyParser = require("body-parser");
const app = express();
app.use(bodyParser.json());
app.use((req, res) => res.send({body: req.body}));
app.listen(3000); |
Thank you, @gfortaine! It fixes my app. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Since commit 5ad6994 in PR #3688 released with axios version 0.21.2,
it has a breaking change which forces to stringify the body even when pre-stringified in app.
To Reproduce
{}
to the server."{}"
to the server.My app have a big post data which is already built by my app.
Axios should just send the body content pass through to the server.
Expected behavior
Environment
Additional context/Screenshots
The text was updated successfully, but these errors were encountered: