Output & Progress
Orb provides several options for controlling how responses are displayed.
Response Body
Section titled “Response Body”By default, the response body is printed to stdout:
orb https://api.example.com/usersSave to File
Section titled “Save to File”Use -o or --output to save the response to a file:
orb https://example.com/file.zip -o downloaded.zipResponse Headers
Section titled “Response Headers”Include Headers (-i)
Section titled “Include Headers (-i)”Use -i or --include to print headers before the body:
orb -i https://example.comOutput:
HTTP/2 200 OKcontent-type: text/htmldate: Mon, 01 Jan 2024 12:00:00 GMTcontent-length: 1234
<!DOCTYPE html>...Headers Only (-I)
Section titled “Headers Only (-I)”Use -I or --head to show only headers (no body):
orb -I https://example.comThis is equivalent to a HEAD request, showing the response line and headers.
Verbose Mode (-v)
Section titled “Verbose Mode (-v)”Use -v or --verbose for detailed request/response information:
orb -v https://example.comVerbose output includes:
- DNS resolution
- TLS handshake details
- Request headers (prefixed with
>) - Response headers (prefixed with
<)
* Resolving host: example.com* Resolved example.com to 93.184.216.34 (12ms)* TLS handshake completed* TLS version: TLSv1.3* Cipher: TLS_AES_256_GCM_SHA384* ALPN: h2* Server certificate:* Subject: CN=example.com* Issuer: CN=DigiCert Global Root CA> GET / HTTP/2> Host: example.com> User-Agent: orb/0.1.0> Accept: */*>< HTTP/2 200 OK< content-type: text/html< date: Mon, 01 Jan 2024 12:00:00 GMT<Write-Out Statistics (-w)
Section titled “Write-Out Statistics (-w)”Use -w or --write-out to display timing and size statistics:
orb -w https://example.comOutput (to stderr):
http_code: 200size_download: 1234time_starttransfer: 0.234time_total: 0.456| Metric | Description |
|---|---|
http_code | HTTP status code |
size_download | Response body size in bytes |
time_starttransfer | Time to first byte (TTFB) in seconds |
time_total | Total request time in seconds |
Progress Bar
Section titled “Progress Bar”Manual Progress (-#)
Section titled “Manual Progress (-#)”Use -# or --progress to show a download progress bar:
orb -# https://example.com/large-file.iso -o large-file.isoOutput:
[00:01:23] ████████████░░░░░░░░░ 45.2% • 450 MiB/1 GiB • 50 MiB/s • ETA 00:01:40Automatic Progress
Section titled “Automatic Progress”For downloads over 100 MiB, progress is shown automatically:
orb https://example.com/huge-file.iso -o huge.iso# Progress bar appears automaticallyAlso, if the first byte takes more than 1 second, progress appears.
Silent Mode (-s)
Section titled “Silent Mode (-s)”Use -s or --silent to suppress all output except the response body:
orb -s https://example.comSilent mode suppresses:
- Verbose output (
-v) - Statistics (
-w) - Progress bar (
-#) - Error messages
Combining Options
Section titled “Combining Options”# Verbose with headers and statsorb -v -i -w https://example.com
# Download with progress, save to fileorb -# https://example.com/file.zip -o file.zip
# Headers only, verboseorb -v -I https://example.com
# Silent mode for scriptingif orb -s https://api.example.com/health; then echo "API is healthy"fiOutput Destinations
Section titled “Output Destinations”| Content | Destination | Flag |
|---|---|---|
| Response body | stdout | (default) |
| Response body | file | -o |
| Response headers | stdout | -i |
| Verbose info | stderr | -v |
| Statistics | stderr | -w |
| Progress bar | stderr | -# |
| Errors | stderr | (always) |
Examples
Section titled “Examples”API Response with Timing
Section titled “API Response with Timing”orb -w https://api.example.com/users | jq .Debug Request Issues
Section titled “Debug Request Issues”orb -v https://api.example.com 2>&1 | lessDownload with Full Details
Section titled “Download with Full Details”orb -v -# -w https://example.com/file.zip -o file.zipPipe Response, Keep Stats
Section titled “Pipe Response, Keep Stats”orb -w https://api.example.com/data 2>stats.txt | process-data