Skip to content

Generate Code Snippet in cURL doesn't escape single quotes in URL #8756

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
david-vermeer opened this issue Jul 10, 2020 · 1 comment
Closed
Assignees

Comments

@david-vermeer
Copy link

Describe the bug
The single quotes in a URL (that are not part of the query string) are not escaped that results into: when exporting the URL in cURL and importing cURL the single quotes are missing.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new request e.g. "GET http://mydomain.com/resource('key')"
  2. Go to 'Generate Code Snippets'
  3. Select language 'cURL'
  4. Generated code for cURL is "curl --location --request GET 'http://mydomain.com/resource('key')'"

Expected behavior
The single quotes are escaped, otherwise after importing the cURL the single quotes are missing.

  1. Create a new request e.g. "GET http://mydomain.com/resource('key')"
  2. Go to 'Generate Code Snippets'
  3. Select language 'cURL'
  4. Generated code for cURL is "curl --location --request GET 'http://mydomain.com/resource(\''key\'')'"

App information (please complete the following information):

  • App Type Native App
  • Postman Version 7.27.1
  • OS: Windows 10
@umeshp7
Copy link

umeshp7 commented Jul 11, 2020

Duplicate of #8674

@umeshp7 umeshp7 marked this as a duplicate of #8674 Jul 11, 2020
@umeshp7 umeshp7 closed this as completed Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants