cURL is a command-line tool. This means it is run from the command prompt (in Windows) or terminal (in Linux or OSX) and its results are displayed in the terminal window. There is no graphical interface. So in order to use cURL, you first have to open a command-line window.
To setup cURL:
- Download and unzip 64-bit cURL with SSL: http://curl.download.nextag.
com/download/curl-7.21.7- win64-ssl-sspi.zip - Copy the curl.exe file into your Windows PATH folder. By default, this is C:\Windows\System32.
- Download and install the Visual Studio 2010 C++ Runtime Redistributable 64 bit here: http://www.microsoft.com/
download/en/details.aspx?id= 13523 - Download the latest bundle of Certficate Authority Public Keys from http://curl.haxx.se/ca/cacert.
pem - Rename this file from cacert.pem to curl-ca-bundle.crt.
- Move this file into your Windows PATH folder. By default, this is C:\\Windows\System32.
Run cmd.exe to open your command prompt.
- type curl http://www.google.com
- type curl https://www.google.com
For both commands, you should see a couple pages of the HTML source code. If you see this, cURL is up and running!
Thanx a lot! I was tired of installing it!
ReplyDeleteThanx a lot! I was tired of installing it!
ReplyDeleteThis comment has been removed by the author.
ReplyDeletei hav followed all the above steps. but when I am try to type the
ReplyDeletecurl http://www.google.com its telling curl: (6) Could not resolve host: www.google.com; Host not found
Try it Again. I believe you must have missed something and Make sure you have copied the certificate and placed under correct directory with the correct name.
Deletewhen i go to step 4 it is just a website what should i download it as
ReplyDeleteYes, The website has various certificates. Just copy the whole content by pressing Ctrl+A,Ctrl+C, paste into notepad and save as "curl-ca-bundle.crt" and move this file into your Windows PATH folder. By default, this is C:\\Windows\System32.
DeleteWow Worked smoothly.... :)
ReplyDeleteThanks a lot.
You are welcome :)
ReplyDeleteHey! Nice Post. Unfortunately, I ran into two problems:
ReplyDelete1. curl worked for http protocols, but not for https. I guessed it must have been a certificate access problem, I decided to use Git Bash instead. However when I try:
\
$ curl -sSL https://get.rvm.io | bash -s stable --rails
I get the following error:
bash line 84: conditional binary operator expected
(23) Failed writing body.
Any ideas what this might be?
Thanks..!!!
Delete1. cURL works for both i,e http and https, I tried few https protocal and its working absolutely fine and thanks you gave me one more solution how to run https. :)
2.Error messgae is "bash line 84: conditional binary operator expected" means use '||" instead of '|'.Hope it works... let me know if its doesn't work.