Last active
October 9, 2017 13:14
-
-
Save rafaelmaeuer/e9ce8f7295c8286646fea59db089410c to your computer and use it in GitHub Desktop.
How to urlencode data into a URL, with bash or curl - From https://stackoverflow.com/questions/37309551/how-to-urlencode-data-into-a-url-with-bash-or-curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urlencode() { | |
python -c 'import urllib, sys; print urllib.quote(sys.argv[1], sys.argv[2])' \ | |
"$1" "$urlencode_safe" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment