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

Use --data-urlencode instead of -F for curl examples #457

Open
rednoah opened this issue Jan 19, 2020 · 0 comments
Open

Use --data-urlencode instead of -F for curl examples #457

rednoah opened this issue Jan 19, 2020 · 0 comments

Comments

@rednoah
Copy link

rednoah commented Jan 19, 2020

The curl examples for the HTTP API are technically incorrect, and only work for simple cases where the -F name=value value is already correctly encoded.

Using --data-urlencode instead of -F would be more correct, as that would correctly encode the value, so that value can be anything.

e.g. this will just work:

--data-urlencode "html=<fancy multi-line HTML document>"

e.g. this probably won't work if your value is more complex:

-F "html=<fancy multi-line HTML document>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant