Last active
November 16, 2017 20:19
-
-
Save jdee/a2140bb12672091001ed93a7b74d6542 to your computer and use it in GitHub Desktop.
Shell escapes in a Fastfile
This file contains hidden or 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
url = "https://www.google.com" | |
content_type = "content-type: application/json" | |
data = %q({"title": "What's New"}) | |
output = sh "curl -X POST #{url.shellescape} -H #{content_type.shellescape} -d #{data.shellescape}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment