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: generate code: curl: use --data-urlencode #416

Open
cvmocanu opened this issue Oct 6, 2023 · 2 comments
Open

fix: generate code: curl: use --data-urlencode #416

cvmocanu opened this issue Oct 6, 2023 · 2 comments

Comments

@cvmocanu
Copy link

cvmocanu commented Oct 6, 2023

When the body is "Form URL encoded", the generated curl code should:

  • either manually encode the value of the field
  • or use --data-urlencode which does the encoding itself (not supported on old versions of curl)

Currently, if we have a field called field with a value a&=b, the value is sent as-is.

With data, the following is sent (obviously incorrect): field=a&=b
With --data-urlencode, the following is sent (correct): field=a%26%3Db

@cvmocanu cvmocanu changed the title generate code: curl: use --data-urlencode fix: generate code: curl: use --data-urlencode Oct 6, 2023
@cvmocanu
Copy link
Author

cvmocanu commented Oct 6, 2023

probably this is the root cause: Kong/httpsnippet#260

@helloanoop
Copy link
Contributor

@sreelakshmi-bruno please have this slotted in our dev sprint for Jan 2025. We want to make some improvements in the Generate Code UI and lets spend some time refining it in Dec.

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

5 participants