Created
February 18, 2015 15:40
-
-
Save danbst/b58176ded4e74bf23b14 to your computer and use it in GitHub Desktop.
How to curl in MinGW without 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
#!/bin/bash | |
function curlMingw { | |
local address="$1" | |
perl -e "use LWP::UserAgent;" -e "my \$ua = LWP::UserAgent->new;" -e "my \$req = HTTP::Request->new(GET => \"$address\");" -e "my \$resp = \$ua->request(\$req);" -e "print \$resp->decoded_content;" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment