Using Curl to get a Https webpage in Windows 7
I just need to fetch an https page, and I'm using curl currently by having the curl.exe application in my Path and calling it with a Perl file. However, then I get the error "* Protocol https not supported or disabled in libcurl". I've been looking around and I can't find a solid set of instructions to get it to work. I have installed cygwin, and OpenSSL-Win32 but something tells me I'm going to have to compile curl from scratch. I have no experience with this. How do you do it?
I found the below steps worked well
- Download and unzip 64-bit cURL with SSL.
- Download the latest bundle of Certficate Authority Public Keys from mozilla.org.
- Rename this file from cacert.pem to curl-ca-bundle.crt
- Make sure both of them are in the PATH environment.
curl -L https://www.google.com
If you are open to try other tools, I think httpie is also a good alternative.
If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.