# Getting started with cURL

cURL stands for client URL.It is a command line tool that is used by developers to transfer data from one server to another server.But before we deep dive in cURL we need to first understand what is server.

## What is a Server(in very simple terms)

A server is a specialized computer that provides information,data or services to other computers(clients) over a network.Withour servers:

* Websites wouldn’t load when you enter web addresses.
    
* We couldn't play games or chat with friends online.
    
* Bussiness couldn’t operate online without server.
    

In short, a **server** is something that stores all the data and **curl** is the delivery person that is used to deliver that data.In simple terms, cURL acts as a messenger that carries your request to the server and brings the data back to you.

### Why programmers need cURL

Programmers need **cURL** because it allows them to talk to a server **directly** without needing a website or a user interface.It is very useful for developers to test endpoints, to check if they are working or not.It provides exact details to developer what has been sent/received, which is helpful for debugging.

### Making your first request using cURL

To make your first request, you need to do only one thing.

Open your **Terminal** or **Command Prompt** and type this:

```plaintext
curl https://www.google.com
```

What happens here:

* cURL sends an simple HTTP get request.
    
* The server receives the request,prepare it and hands the response back to **cURL**.
    
* Once the response(data) is delivered you can see it on your terminal screen.
    

That’s how your **first API request runs** (no browser, no fancy softwares, just the terminal).

### Understanding request and response

* A Request is the desired action sent by your computer to the server.
    
* A Response is the answer sent back by the server to your computer.
    

How they Works together:

1. **The Request** goes out.
    
2. The server **thinks** about it.
    
3. **The Response** comes back.
    

### Using cURL to talk to APIs

cURL is a useful tool that allows you to communicate with APIs by sending HTTP requests directly from the terminal.Using cURL we can send headers along with our request.We can send many type of requests such as GET,POST,PUT,DELETE using cURL.By this You can check if an API is working in seconds without building a whole app first.
