> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Network

> Make HTTP requests and download files with curl and wget.

`curl` and `wget` reach the network from the shell, and write what they fetch
into any writable mount. Expand a command to see every flag it takes.

## HTTP

**curl**

Send an HTTP request.

**26 flags**

**-H, --header \<text>**

Add a custom header to the request.

**-A, --user-agent \<text>**

Set the User-Agent header.

**-X, --request \<text>**

Specify the HTTP request method.

**-d, --data \<text>**

Send the given data as the request body.

**--data-binary \<text>**

Send the data exactly as given, a file unchanged.

**--data-raw \<text>**

Send the data with no special meaning for @.

**--data-urlencode \<text>**

Send the data URL-encoded.

**--json \<text>**

Send the data as JSON.

**-u, --user \<text>**

Send the user and password for basic auth.

**-F, --form \<text>**

Send one URL-encoded text field; a repeated `-F` keeps the last, and multipart uploads are unsupported.

**-b, --cookie \<text>**

Send cookies: NAME=VALUE data as given, else a cookie file to read.

**-c, --cookie-jar \<path>**

Write every cookie to the given file after the transfer, - for stdout.

**-o, --output \<path>**

Write response body to the given file.

**-D, --dump-header \<path>**

Write the received headers to the given file, - for stdout.

**-L, --location**

Follow HTTP redirects.

**-f, --fail**

Fail with exit 22 on an HTTP error status.

**-s, --silent**

Run silently with no progress or messages.

**-S, --show-error**

Show errors even when silent.

**-v, --verbose**

Dump the request and response headers on stderr.

**-i, --include**

Include the response headers in the output.

**-I, --head**

Fetch the headers only.

**-4, --ipv4**

Accept IPv4 preference (transport selects the address family).

**-6, --ipv6**

Accept IPv6 preference (transport selects the address family).

**-w, --write-out \<text>**

Print transfer information after completion.

**-m, --max-time \<text>**

Give up after this many seconds.

**-k, --insecure**

Skip verification of the server certificate.

**wget**

Download a URL or check its response.

**4 flags**

**-O \<path>**

Write the downloaded content to the given file.

**-q**

Run quietly with no output.

**-T, --timeout \<text>**

Set the network timeout in seconds (zero disables it).

**--spider**

Check that the URL exists without downloading it.

`curl` writes the body to stdout unless `-o` selects a virtual file. `wget` saves to a virtual file; use `-O -` for stdout. Both respect destination mount permissions.

**Limits:** These are HTTP tools, with no full curl or Wget option set. Recursive Wget downloads (`-r`, `--mirror`) are unsupported. `curl -4/-6` are accepted, but the host transport chooses the address family. `wget -T` uses one request deadline rather than separate DNS, connect, and read timers; zero disables it.

`curl -b` sends cookies from a virtual file, or `NAME=VALUE` as given; `curl -c FILE` saves them after the request, so a login carries across `curl` calls. In the browser no cookies are sent or received, but `-c` still writes its file, so it can replace a saved jar with an empty one. Public suffixes such as `co.uk` are not checked.

`curl -F` sends one URL-encoded text field; repeated `-F` keeps only the last field, and `@FILE` is literal text. Multipart file uploads are unsupported.

`curl -w` supports `http_code`, `response_code`, `url_effective`, `num_redirects`, `size_download`, `content_type`, `method`, `exitcode`, and `time_total`. Other variables produce a diagnostic.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.