Skip to content

Quick Start

The simplest way to use orb is to pass a URL:

Terminal window
orb https://httpbin.org/get

This makes a GET request and prints the response body to stdout.

Terminal window
orb https://api.example.com/users \
-H "Authorization: Bearer token123" \
-H "Accept: application/json"

Use the --json flag to send JSON data (automatically sets Content-Type: application/json):

Terminal window
orb https://api.example.com/users \
-X POST \
--json '{"name": "Alice", "email": "alice@example.com"}'
Terminal window
orb https://api.example.com/login \
-X POST \
-d "username=alice&password=secret"

Use -F for multipart form uploads:

Terminal window
orb https://api.example.com/upload \
-X POST \
-F "file=@/path/to/image.png" \
-F "description=My image"

Use -i to print response headers before the body:

Terminal window
orb -i https://httpbin.org/get

Output:

HTTP/2 200 OK
content-type: application/json
date: Mon, 01 Jan 2024 00:00:00 GMT
{
"args": {},
...
}

Use -I to only show headers (like a HEAD request):

Terminal window
orb -I https://example.com

Use -v to see the full request/response exchange:

Terminal window
orb -v https://example.com

This shows:

  • DNS resolution
  • TLS handshake details
  • Request headers sent
  • Response headers received
Terminal window
orb -u username:password https://api.example.com/protected
Terminal window
orb --bearer "your-token-here" https://api.example.com/protected

By default, orb doesn’t follow redirects. Use -L to follow them:

Terminal window
orb -L https://httpbin.org/redirect/3
Terminal window
orb https://example.com/file.zip -o downloaded.zip

For large downloads, orb automatically shows a progress bar.

Connect to a WebSocket server:

Terminal window
# Send a single message
orb wss://echo.websocket.org --ws-message "Hello!"
# Interactive mode (when TTY is available)
orb wss://echo.websocket.org

Orb automatically negotiates the best protocol. To force a specific version:

Terminal window
# Force HTTP/1.1
orb --http1.1 https://example.com
# Force HTTP/2
orb --http2 https://example.com
# Force HTTP/3 (QUIC)
orb --http3 https://example.com