documentation icon indicating copy to clipboard operation
documentation copied to clipboard

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

Open rednoah opened this issue 5 years ago • 0 comments

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>"

rednoah avatar Jan 19 '20 11:01 rednoah