Skip to content

zehedisodef1-oss/httpit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PyPI Python Versions License Stars CI

🌐 httpit

A human-friendly HTTP client for your terminal β€” httpie alternative with zero dependencies

Stop wrestling with curl flags. httpit makes HTTP requests from the terminal feel natural, with automatic JSON formatting, syntax highlighting, and an intuitive syntax you'll remember.

✨ Why httpit?

  • Zero hard dependencies β€” works with just Python 3.8+ stdlib
  • Rich output β€” beautiful syntax highlighting when Rich is installed
  • Intuitive syntax β€” httpit post URL name=John age:=25 just works
  • Pipe-friendly β€” echo '{"key":"val"}' | httpit post URL
  • Config file β€” .httpitrc for default headers and base URL
  • Download with progress β€” httpit get URL --download

πŸš€ Quick Start

# Install
pip install httpit

# Or just clone and use
git clone https://github.com/zehedisodef1-oss/httpit.git
cd httpit && pip install -e .

πŸ“– Usage

# Simple GET
httpit get https://api.github.com/users/octocat

# POST with JSON body (automatic serialization)
httpit post https://api.example.com/data name=John age:=25 active:=true

# PUT request
httpit put https://api.example.com/item/1 title="Updated"

# DELETE
httpit delete https://api.example.com/item/1

# HEAD (headers only)
httpit head https://api.example.com/health

# With Basic Auth
httpit get https://api.example.com/me --auth user:password

# With Bearer Token
httpit get https://api.example.com/me --bearer eyJhbGciOi...

# Custom Headers
httpit get URL -H "X-Custom: value" -H "Accept: text/html"

# Verbose mode (show request details)
httpit get URL --verbose

# Download file with progress bar
httpit get https://example.com/file.zip --download

# Timeout
httpit get URL --timeout 10

# Pipe JSON from stdin
echo '{"key":"value"}' | httpit post https://api.example.com/data

πŸ“Š Comparison

Feature httpit httpie curl
Zero dependencies βœ… ❌ (requests, rich...) βœ… (C binary)
JSON body shorthand βœ… key:=value βœ… key:=value ❌ manual -d
Syntax highlighting βœ… (optional Rich) βœ… (required Rich) ❌
Config file βœ… .httpitrc βœ… .config/httpie/ ❌
Download progress βœ… βœ… ⚠️ basic
Pipe stdin support βœ… βœ… βœ…
Install size ~20KB ~5MB+ varies
Auth flags βœ… --auth --bearer βœ… --auth ❌ -u -H
Custom headers βœ… -H βœ… -H βœ… -H
Response stats βœ… time + size βœ… ❌ manual -w

βš™οΈ Configuration

Create a .httpitrc (JSON) in your project root or home directory:

{
    "base_url": "https://api.example.com",
    "default_headers": {
        "Accept": "application/json",
        "X-Api-Version": "v1"
    },
    "timeout": 30,
    "verify_ssl": true
}

πŸ“ Examples

Check the examples/ directory for more:

Example Description
01_basic_get.py Simple GET request
02_post_json.py POST with JSON body
03_auth.py Basic authentication
httpitrc.example Config file template

πŸ›£οΈ Roadmap

  • Session support (cookie persistence)
  • .env file integration
  • GraphQL support (httpit graphql URL query='{ ... }')
  • WebSocket ping
  • Load testing mode (--bench N)
  • Export as cURL command (--export-curl)
  • Plugin system for custom output formatters

πŸ“„ License

MIT Β© zehedisodef1-oss

About

🌐 A human-friendly HTTP client for your terminal - httpie alternative with zero dependencies

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages