---
title: "How to Perform REST API Requests and Debugging Using cURL CLI?"  
description: "How to Perform REST API Requests and Debugging Using cURL CLI?"  
author: "John Smith"  
published: 2026-08-19  
updated: 2026-08-18  
canonical: https://answers.mindstick.com/qa/117080/how-to-perform-rest-api-requests-and-debugging-using-curl-cli  
category: "API Testing"  
tags: ["cURL", "CLI", "REST API", "HTTP", "Debugging"]  
reading_time: 1 minute  

---

# How to Perform REST API Requests and Debugging Using cURL CLI?

cURL is one of the most widely used command-line tools for transferring data with URLs. It is ideal for quick REST API testing and debugging straight from the CMD terminal.

## How to send custom HTTP POST and GET requests using cURL?

Below are common cURL commands used for testing RESTful services:

### 1. GET Request with Headers

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

### 2. POST Request with JSON Body

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

Using the `-i` flag includes HTTP response headers in the output, which helps verify status codes and caching policies.


---

Original Source: https://answers.mindstick.com/qa/117080/how-to-perform-rest-api-requests-and-debugging-using-curl-cli

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
