Quick Start
Your First Request
Section titled “Your First Request”The simplest way to use orb is to pass a URL:
orb https://httpbin.org/getThis makes a GET request and prints the response body to stdout.
Common Operations
Section titled “Common Operations”GET Request with Headers
Section titled “GET Request with Headers”orb https://api.example.com/users \ -H "Authorization: Bearer token123" \ -H "Accept: application/json"POST with JSON Data
Section titled “POST with JSON Data”Use the --json flag to send JSON data (automatically sets Content-Type: application/json):
orb https://api.example.com/users \ -X POST \ --json '{"name": "Alice", "email": "alice@example.com"}'POST with Form Data
Section titled “POST with Form Data”orb https://api.example.com/login \ -X POST \ -d "username=alice&password=secret"File Upload
Section titled “File Upload”Use -F for multipart form uploads:
orb https://api.example.com/upload \ -X POST \ -F "file=@/path/to/image.png" \ -F "description=My image"Viewing Response Details
Section titled “Viewing Response Details”Include Response Headers
Section titled “Include Response Headers”Use -i to print response headers before the body:
orb -i https://httpbin.org/getOutput:
HTTP/2 200 OKcontent-type: application/jsondate: Mon, 01 Jan 2024 00:00:00 GMT
{ "args": {}, ...}Headers Only
Section titled “Headers Only”Use -I to only show headers (like a HEAD request):
orb -I https://example.comVerbose Mode
Section titled “Verbose Mode”Use -v to see the full request/response exchange:
orb -v https://example.comThis shows:
- DNS resolution
- TLS handshake details
- Request headers sent
- Response headers received
Authentication
Section titled “Authentication”Basic Auth
Section titled “Basic Auth”orb -u username:password https://api.example.com/protectedBearer Token
Section titled “Bearer Token”orb --bearer "your-token-here" https://api.example.com/protectedFollowing Redirects
Section titled “Following Redirects”By default, orb doesn’t follow redirects. Use -L to follow them:
orb -L https://httpbin.org/redirect/3Saving Output to a File
Section titled “Saving Output to a File”orb https://example.com/file.zip -o downloaded.zipFor large downloads, orb automatically shows a progress bar.
WebSocket Connections
Section titled “WebSocket Connections”Connect to a WebSocket server:
# Send a single messageorb wss://echo.websocket.org --ws-message "Hello!"
# Interactive mode (when TTY is available)orb wss://echo.websocket.orgHTTP/2 and HTTP/3
Section titled “HTTP/2 and HTTP/3”Orb automatically negotiates the best protocol. To force a specific version:
# Force HTTP/1.1orb --http1.1 https://example.com
# Force HTTP/2orb --http2 https://example.com
# Force HTTP/3 (QUIC)orb --http3 https://example.comWhat’s Next?
Section titled “What’s Next?”- HTTP Requests - Learn about methods, headers, and body data
- Authentication - Detailed auth options
- TLS & SSL - Certificate handling
- Options Reference - Complete list of all options