HTTP Client

v1.0.0-CLIApril 1, 2026

A fast, modern HTTP client for your terminal. Send requests with familiar curl-compatible syntax and native support for all modern HTTP protocols.

curl-Compatible Syntax

Switch from curl without learning new commands. The flags you already know work the same way:

FlagDescription
-HAdd request header
-dSend request body
-uBasic authentication (user:pass)
-LFollow redirects
-kSkip TLS verification
-oSave response to file
-DDownload with progress bar
-vVerbose output
-sSilent mode
-XExplicit HTTP method
-FMultipart form data
-AUser-Agent header
-eReferer header
-bSend cookies
-cSave cookies to file
-IHEAD request
-mTimeout in seconds

Protocol Support

tgrs supports all three HTTP protocol versions with automatic negotiation:

  • HTTP/1.1 - Connection pooling with keep-alive
  • HTTP/2 - Multiplexed streams over a single connection
  • HTTP/3 - QUIC-based transport for faster connections and reduced latency

Force a specific protocol when needed:

tgrs GET https://api.example.com --http1.1
tgrs GET https://api.example.com --http2
tgrs GET https://api.example.com --http3

When no protocol is forced, tgrs negotiates the best available protocol via TLS ALPN and pools connections for reuse.

Request Types

tgrs handles all common request patterns:

Shorthand JSON body - key:value pairs automatically build a JSON object:

tgrs POST https://api.example.com/users name:John age:25 active:true

Raw JSON body - with explicit Content-Type header:

tgrs POST https://api.example.com/users -H "Content-Type: application/json" -d '{"name": "John"}'

Form data:

tgrs POST https://api.example.com/login -F "username=admin" -F "password=secret"

File upload:

tgrs POST https://api.example.com/upload -F "file=@report.pdf"

Authentication

Built-in support for common authentication methods:

# Basic auth
tgrs GET https://api.example.com -u admin:secret

# Bearer token
tgrs GET https://api.example.com --bearer my-token

# OAuth 2.0 (client_credentials, password, authorization_code)
tgrs GET https://api.example.com --oauth2 client_credentials:https://auth.example.com/token:client_id:client_secret

Additional Features

  • Retry - Automatic retry with exponential backoff: --retry 3
  • Redirect - Follow redirects with loop detection: -L --max-redirects 10
  • DNS Override - Custom DNS resolution: --resolve host:port:addr
  • Max File Size - Limit response body size: -S 1048576
  • Dry Run - Preview request without sending: -r
  • Certificate Info - Inspect TLS certificates: -C