DEV Community

Dendi Handian
Dendi Handian

Posted on • Updated on

Installing Curl on Windows

Download the latest zipped binary

You can download it at https://curl.se/windows/, choose either 64-bit or 32-bit, depends on your machine preference.

Extract and Move to Program Files Directory

Program Files directory is a good place for any program directory, so let's create a folder inside C:\Program Files named Curl and extract the zip to this folder.

Curl Directory

Add Path For Executable Curl

Hit the Windows icon on the keyboard and type edit the system environment variables and the menu. The System Properties window will popped-up. Click the environment variables button and the environment variables window will popped-up. In the User variables for <your-user>, find and choose Path and then hit the Edit button. The Edit environment variable window will popped-up and click the New button and add C:\Program Files\Curl\bin and then hit OK for all windows.

Environment Variables Windows

Test the Curl

Open new CMD/CommandPrompt instance and try to type curl --help and enter. If you see the list of commands usage, then it already works.

C:\Users\dendi>curl --help
Usage: curl [options...] <url>
     --abstract-unix-socket <path> Connect via abstract Unix domain socket
     --anyauth       Pick any authentication method
 -a, --append        Append to target file when uploading
     --basic         Use HTTP Basic Authentication
     --cacert <CA certificate> CA certificate to verify peer against
     --capath <dir>  CA directory to verify peer against
 -E, --cert <certificate[:password]> Client certificate file and password

...

Enter fullscreen mode Exit fullscreen mode

Hit an Open API

try it like this:

curl -X GET "https://swapi.dev/api/people"
Enter fullscreen mode Exit fullscreen mode

See it it succeed retrieving the data

Top comments (0)