Skip to main content
Send Web Request

How to Make an HTTP Request with cURL

cURL is a command-line tool for making HTTP requests. It's available on most systems and is widely used for API testing and scripting.

GET request example

Making a GET request to fetch data with custom headers:

curl -X GET "https://api.example.com/users" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"

POST request example

Making a POST request to send JSON data:

curl -X POST "https://api.example.com/users" \
  -H "Content-Type: application/json" \
  -d '{"name": "John", "email": "john@example.com"}'

Other libraries you can try