linux/curl

HTTP Client

Transfer data to/from servers

network
http
api

Command

curl

Explanation

curl is a command-line tool for transferring data with URLs, supporting many protocols including HTTP, HTTPS, FTP.

Examples

GET request to API

curl https://api.example.com

POST JSON data

curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://api.example.com

Download file

curl -o file.zip https://example.com/file.zip