Skip to content

js-fetch and nodejs-axios fail dealing line breaks(\r\n) in body #350

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

Closed
RikaKagurasaka opened this issue Oct 2, 2020 · 1 comment · Fixed by #388
Closed

js-fetch and nodejs-axios fail dealing line breaks(\r\n) in body #350

RikaKagurasaka opened this issue Oct 2, 2020 · 1 comment · Fixed by #388
Labels
bug Something isn't working

Comments

@RikaKagurasaka
Copy link

Describe the bug
When the post body includes line breaks(\r\n), (at least in multipart/form-data requests), the code in body part didn't escape \r.

To Reproduce
Generate code for request whose body contains \r

Expected code snippet and corresponding request
escape \r

Screenshots
图片

Version of postman-code-generators/Postman app:
v7.33.1

@abhijitkane abhijitkane added the bug Something isn't working label Oct 20, 2020
@webholik
Copy link
Contributor

@RikaSugisawa Are you manually setting the header and body? Because for mutlipart/form-data requests, both js-fetch and nodejs-axios use form-data library to handle body.

For example:
Screenshot_20201021_152334
Screenshot_20201021_152431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants