Skip to content

A mini Http cli Using C language and libcurl library just as simple Postman , Work in Linux WsL Mac and Android through (termux) , User can make a get request, Post request supporting JSON and application urlencoded both formate

License

Notifications You must be signed in to change notification settings

aadityansha06/Flash-Http-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

35 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ Flash HTTP CLI

A fast, simple, and powerful HTTP client for your terminal - like Postman, but in CLI

Release License Language

Flash is a beautiful, terminal-based HTTP client that brings the power of API testing to your command line. Built with C and libcurl, it offers a clean Gruvbox-themed interface that's easy on the eyes and powerful in functionality.

✨ Features

  • 🌐 GET Requests - Fetch data from any REST API
  • πŸ“€ POST Requests - Send form data and JSON payloads
  • 🎨 Beautiful UI - Gruvbox dark theme with intuitive navigation
  • ⚑ Fast & Lightweight - Built in C for maximum performance
  • πŸ›‘οΈ Memory Safe - Proper memory management and error handling
  • πŸ“± Cross-Platform - Works on Linux, macOS, and Windows (with proper setup)

πŸ“Έ Screenshots

Main Menu

Flash Main Menu Clean and intuitive main interface

POST Method Selection

POST Method Easy content-type selection for POST requests

πŸš€ Quick Start

Download Pre-built Binary (Recommended)

Download the latest release for Linux:

# Download the latest release
wget https://github.com/aadityansha06/Flash-Http-cli/releases/download/1.1.0/flash-linux-x64

# Make it executable
chmod +x flash-linux-x64

# Run Flash
./flash-linux-x64

Build from Source

Prerequisites

  • GCC compiler
  • libcurl development libraries
  • Make (optional)

Ubuntu/Debian

sudo apt update
sudo apt install build-essential libcurl4-openssl-dev

CentOS/RHEL/Fedora

# CentOS/RHEL
sudo yum install gcc libcurl-devel

# Fedora
sudo dnf install gcc libcurl-devel

macOS

# Using Homebrew
brew install curl

# Using MacPorts
sudo port install curl

Compilation

# Clone the repository
git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli

# build
make

# Run
./bin/flash

Termux installation

# Install dependencies
pkg update && pkg upgrade
pkg install clang curl

# Clone the repository
git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli

# Compile
clang Flash-cli.c -o Flash -lcurl

# Run
./Flash


Note: You may see warnings about getchar() return values or empty-body while loops during compilation.
These warnings are safe to ignore β€” the program will still run fine.

πŸ”§ Usage

GET Requests

  1. Select option 1 from the main menu
  2. Enter the URL (e.g., https://jsonplaceholder.typicode.com/posts/1)
  3. View the formatted response

POST Requests - Form Data

  1. Select option 2 from the main menu
  2. Choose 1 for Form Data
  3. Enter data in format: name=John+Doe&email=john%40gmail.com&age=25
  4. Enter the target URL
  5. Send the request

POST Requests - JSON

  1. Select option 2 from the main menu
  2. Choose 2 for JSON Data
  3. Enter JSON data: {"name":"John","email":"john@gmail.com","age":25}
  4. Enter the target URL
  5. Send the request

πŸ“š Examples

Testing a REST API

# GET request to fetch user data
URL: https://jsonplaceholder.typicode.com/users/1

# POST form data to create a user
Data: name=Flash+User&email=flash%40example.com&phone=1234567890
URL: https://httpbin.org/post

# POST JSON data
Data: {"title":"Flash HTTP CLI","body":"A powerful terminal HTTP client","userId":1}
URL: https://jsonplaceholder.typicode.com/posts

Working with APIs

Flash handles various HTTP scenarios:

  • βœ… REST APIs
  • βœ… Form submissions
  • βœ… JSON APIs
  • βœ… Authentication headers (manual setup)
  • βœ… URL encoding
  • βœ… Error handling

🎨 Theme

Flash uses the Gruvbox Dark color scheme for a comfortable terminal experience:

  • 🟀 Background: Dark, easy on the eyes
  • 🟨 Highlights: Warm yellows and oranges
  • 🟩 Success: Bright green indicators
  • πŸŸ₯ Errors: Clear red error messages
  • πŸ”΅ Info: Cool blue accents

πŸ”§ Advanced Usage

URL Encoding

Flash automatically handles basic URL encoding, but for complex data:

# Spaces become +
name=John Doe β†’ name=John+Doe

# Special characters use % encoding  
email=user@domain.com β†’ email=user%40domain.com

JSON Formatting

Ensure your JSON is properly formatted:

{
  "name": "Flash User",
  "data": {
    "email": "user@example.com", 
    "active": true,
    "id": 123
  }
}

Development Setup

git clone https://github.com/aadityansha06/Flash-Http-cli.git
cd Flash-Http-cli

# Install development dependencies
sudo apt install build-essential libcurl4-openssl-dev

# Build and test
gcc -g -o flash-dev main.c -lcurl
./flash-dev

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. πŸ’Ύ Commit your changes (git commit -m 'Add amazing feature')
  4. πŸš€ Push to the branch (git push origin feature/amazing-feature)
  5. 🎯 Open a Pull Request

Contributors

Thanks to everyone who has contributed to Flash HTTP CLI! πŸ™

Core Team

Contributors

  • @dexter-xD - Enhanced JSON input with multi-line support and improved UI alignment (#6)

  • @sakshamg567 - Improved form-data input handling (#2)


Want to contribute? Check out my new issues or Just raise a PR 😊!

πŸ› Known Issues

  • Windows support requires additional setup for libcurl
  • Very large responses (>1GB) may cause memory issues
  • Binary releases are currently Linux-only

πŸ“‹ TODO

  • Custom headers support
  • Authentication methods (Bearer, Basic Auth)
  • Request/Response history
  • Configuration file support
  • Windows binary releases
  • Response syntax highlighting

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Aadityansh

πŸ™ Acknowledgments

  • libcurl - The fantastic HTTP library
  • Gruvbox - The beautiful color scheme
  • Inspired by Postman - The API development platform

About

A mini Http cli Using C language and libcurl library just as simple Postman , Work in Linux WsL Mac and Android through (termux) , User can make a get request, Post request supporting JSON and application urlencoded both formate

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published