Skip to content

Instantly share code, notes, and snippets.

@danbst
Created February 18, 2015 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbst/b58176ded4e74bf23b14 to your computer and use it in GitHub Desktop.
Save danbst/b58176ded4e74bf23b14 to your computer and use it in GitHub Desktop.
How to curl in MinGW without curl
#!/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