Skip to content

CLI Options

Available CLI options.

Headers

fasthttp get https://api.example.com/data \
  -H "Authorization: Bearer token" \
  -H "User-Agent: MyApp/1.0"

Multiple headers:

fasthttp get https://api.example.com/data -H "Authorization: Bearer token,Content-Type: application/json"

JSON Body

fasthttp post https://api.example.com/users \
  --json '{"name": "John", "email": "john@example.com"}'

Form Data

fasthttp post https://api.example.com/login \
  --data "username=john&password=secret"

Timeout

fasthttp get https://api.example.com/data --timeout 60

Default: 30 seconds.

Debug Mode

fasthttp get https://api.example.com/data --debug

Shows:

  • Request headers
  • JSON/data body
  • Response headers

Query Parameters

fasthttp get "https://api.example.com/search?q=test" -p "page=1" -p "limit=10"

Save to File

fasthttp get https://api.example.com/data json -o response.json

Options Summary

Option Short Description
--header -H Add header
--param -p Add query parameter
--json -j JSON body
--data -d Form data
--timeout -t Request timeout
--debug - Debug mode
--output -o Save to file
--format - Output format