Skip to content

Commit b84565d

Browse files
authored
Merge pull request #430 from ryanfowler/doc-updates
Fix missing formats and vague defaults in docs
2 parents 57bf9f7 + 865ad86 commit b84565d

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

docs/cli-reference.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ fetch --timeout 2.5 example.com
304304

305305
### `--redirects NUM`
306306

307-
Maximum automatic redirects. Use `0` to disable.
307+
Maximum automatic redirects. Default: `10`. Use `0` to disable.
308308

309309
```sh
310310
fetch --redirects 0 example.com # Don't follow redirects
@@ -563,20 +563,21 @@ fetch --from-curl 'https://example.com'
563563

564564
**Supported curl flags:**
565565

566-
| Category | Curl Flags |
567-
|---|---|
568-
| Request | `-X`, `-H`, `-d`, `--data-raw`, `--data-binary`, `--data-urlencode`, `--json`, `-F`, `-T`, `-I`, `-G` |
569-
| Auth | `-u`, `--aws-sigv4`, `--oauth2-bearer` |
570-
| TLS | `-k`, `--cacert`, `-E`/`--cert`, `--key`, `--tlsv1.x` |
571-
| Output | `-o`, `-O`, `-J` |
572-
| Network | `-L`, `--max-redirs`, `-m`/`--max-time`, `--connect-timeout`, `-x`, `--unix-socket`, `--doh-url`, `--retry`, `--retry-delay`, `-r` |
573-
| HTTP version | `-0`, `--http1.1`, `--http2`, `--http3` |
574-
| Headers | `-A`, `-e`, `-b` |
575-
| Verbosity | `-v`, `-s` |
576-
| Protocol | `--proto` (restricts allowed protocols; errors if URL scheme is not allowed) |
577-
| No-ops | `--compressed`, `-S`, `-N`, `--no-keepalive`, `-#`, `--no-progress-meter`, `-n`, `-f`, `--fail-with-body`, `--proto-default`, `--proto-redir` |
566+
| Category | Curl Flags |
567+
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------- |
568+
| Request | `-X`, `-H`, `-d`, `--data-raw`, `--data-binary`, `--data-urlencode`, `--json`, `-F`, `-T`, `-I`, `-G` |
569+
| Auth | `-u`, `--aws-sigv4`, `--oauth2-bearer` |
570+
| TLS | `-k`, `--cacert`, `-E`/`--cert`, `--key`, `--tlsv1.x` |
571+
| Output | `-o`, `-O`, `-J` |
572+
| Network | `-L`, `--max-redirs`, `-m`/`--max-time`, `--connect-timeout`, `-x`, `--unix-socket`, `--doh-url`, `--retry`, `--retry-delay`, `-r` |
573+
| HTTP version | `-0`, `--http1.1`, `--http2`, `--http3` |
574+
| Headers | `-A`, `-e`, `-b` |
575+
| Verbosity | `-v`, `-s` |
576+
| Protocol | `--proto` (restricts allowed protocols; errors if URL scheme is not allowed) |
577+
| No-ops | `--compressed`, `-S`, `-N`, `--no-keepalive`, `-#`, `--no-progress-meter`, `-n`, `-f`, `--fail-with-body`, `--proto-default`, `--proto-redir` |
578578

579579
**Notes:**
580+
580581
- `-b`/`--cookie` only supports inline cookie strings (e.g., `-b 'name=value'`). Cookie jar files are not supported and will return an error.
581582
- `--data-urlencode` supports `@filename` and `name@filename` forms for reading and URL-encoding file contents.
582583

docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ connect-timeout = 2.5
274274
#### `timeout`
275275

276276
**Type**: Number (seconds)
277-
**Default**: System default
277+
**Default**: None (no timeout)
278278

279279
Set a timeout for HTTP requests. Accepts decimal values.
280280

@@ -289,7 +289,7 @@ timeout = 2.5
289289
#### `redirects`
290290

291291
**Type**: Integer
292-
**Default**: System default
292+
**Default**: `10`
293293

294294
Set the maximum number of automatic redirects to follow.
295295

@@ -350,7 +350,7 @@ http = 2
350350

351351
**Type**: String
352352
**Values**: `1.0`, `1.1`, `1.2`, `1.3`
353-
**Default**: System default
353+
**Default**: `1.2`
354354

355355
Specify the minimum TLS version to use.
356356

docs/getting-started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ fetch httpbin.org/json | jq '.slideshow.title'
105105
- **XML / HTML** - Indented and highlighted
106106
- **CSS** - Formatted and highlighted
107107
- **CSV** - Column-aligned table output
108+
- **Markdown** - Rendered with terminal formatting
109+
- **YAML** - Syntax highlighted
108110
- **Images** - Rendered directly in supported terminals
109111
- **Protobuf / msgpack** - Decoded and displayed as JSON
110112
- **SSE / NDJSON** - Streamed line-by-line

0 commit comments

Comments
 (0)