postman-code-generators icon indicating copy to clipboard operation
postman-code-generators copied to clipboard

Add an option to remove new line characters from body in cURL code snippet

Open Pawloland opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. When generating cURL code snippet, even though the "Generate multiline snippet" option is disabled, the code snipped can became multiline when raw body ex. JSON contains new line character(s). It's especially annoying when copy-pasting in old Windows terminals that don't handle it properly. By adding this option we could have neatly formatted JSON in body editor area and one line cURL code snippet.

Describe the solution you'd like A separate option in "code generation settings" to strip any new line characters from body (disabled by default). When enabled it would replace any "\n" with "".

Additional context PR #541

Pawloland avatar Oct 24 '21 18:10 Pawloland