Request options
Method, headers, body, cookies, authentication, proxy… curl-style.
These options are added to the download command and override the profile.
| Option | Purpose |
|---|---|
-X, --method METHOD | HTTP method (GET by default) |
-H, --header "Name: value" | Header, repeatable; ${VAR} is replaced by the environment variable |
-d, --data TEXT | Text body |
--data-file FILE | Body read from a file |
--json JSON | JSON body (adds Content-Type: application/json) |
-b, --cookie "a=1; b=2" | Cookies |
--cookies-file FILE | cookies.txt file in Netscape format |
-u, --user name[:password] | Basic authentication; the password is asked when missing |
-e, --referer URL | Referer header |
-A, --user-agent UA | User-Agent |
--proxy URL | http://, https:// or socks5:// proxy |
--max-redirs N | Maximum redirects (10 by default) |
--timeout SECONDS | Timeout |
-k, --insecure | Accepts any TLS certificate (dangerous) |
-o, --output NAME | Final file name (without folder) |
--data, --data-file and --json are mutually exclusive.
Methods other than GET
A POST (or PUT…) is never replayed per segment: it is sent once and downloaded in a single stream, to avoid side effects on the server.
Example
turbodl-cli default https://api.example.com/export \
-X POST --json '{"format":"csv"}' \
-H "Authorization: Bearer ${API_TOKEN}" \
-o export.csv