---
title: "How to Use HTTPie CLI as a User-Friendly Command-Line API Testing Tool?"  
description: "How to Use HTTPie CLI as a User-Friendly Command-Line API Testing Tool?"  
author: "Hemant Patel"  
published: 2026-08-19  
updated: 2026-08-18  
canonical: https://answers.mindstick.com/qa/117081/how-to-use-httpie-cli-as-a-user-friendly-command-line-api-testing-tool  
category: "API Testing"  
tags: ["HTTPie", "CLI", "API Testing", "REST", "JSON"]  
reading_time: 1 minute  

---

# How to Use HTTPie CLI as a User-Friendly Command-Line API Testing Tool?

HTTPie is an intuitive command-line HTTP client built as an alternative to cURL, offering human-friendly syntax, formatted output, and automatic JSON processing.

## How to test API endpoints using HTTPie CLI?

Unlike cURL, HTTPie automatically formats JSON responses and sets appropriate headers.

### 1. Installing HTTPie

```
pip install httpie
```

### 2. Sending a GET Request

```
http GET https://api.example.com/v1/products Category==Electronics
```

### 3. Sending a POST Request with JSON Data

Fields can be passed directly as key-value pairs without writing raw JSON strings:

```
http POST https://api.example.com/v1/products \
  Authorization:"Bearer YOUR_TOKEN" \
  title="Wireless Mouse" \
  price:=29.99
```

HTTPie automatically sets **Content-Type: application/json** when key-value syntax is used.


---

Original Source: https://answers.mindstick.com/qa/117081/how-to-use-httpie-cli-as-a-user-friendly-command-line-api-testing-tool

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
