> ## Content Index
> Fetch the complete content index at: https://www.workroom-productions.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# cURL Exercises for Testers
- URL: https://www.workroom-productions.com/curl-exercises-for-testers/
- Published: 2025-07-24T09:03:34.000Z
- Updated: 2025-07-24T11:51:01.000Z
- Author: James Lyndsay
- Tags: Exercises, Tools

*placeholder*

## Information about an endpoint

Try `curl -I "https://www.workroom-productions.com/curl-exercises-for-testers/"`

compare with `curl -I "https://agiletestingdays.com/2025/session/the-art-of-crafting-your-custom-tools/"`

## Using with other tools

curl uses different output streams:

- **stdout**: HTTP response headers/body
- **stderr**: Progress information, error messages

When curl detects:

- **Terminal output**: Shows headers only, no progress meter
- **Piped output**: Shows progress meter to stderr, sends headers to stdout

See what happens when piping to other tools: `curl -I "https://www.workroom-productions.com/curl-exercises-for-testers/" | grep "status"`

Note the unexpected *extra* info compared with `curl -I "https://www.workroom-productions.com/curl-exercises-for-testers/"`

Manage this with `-s`

Compare with `curl -sI "https://www.workroom-productions.com/curl-exercises-for-testers/" | grep "Status"`

## Information about a connection

try `curl -vI "https://www.workroom-productions.com/curl-exercises-for-testers/"`

## Speed

try `curl -w "Total time: %{time_total}s\n" -s -o /dev/null "https://www.workroom-productions.com/curl-exercises-for-testers/"`

This uses the `-w` writeeout option, which exposes information about the transaction:

| Variable               | Description                   |
| ---------------------- | ----------------------------- |
| %{content\_type}       | Content-Type of response      |
| %{http\_code}          | HTTP status code              |
| %{http\_connect}       | HTTP connect response code    |
| %{local\_ip}           | Local IP address              |
| %{local\_port}         | Local port number             |
| %{num\_connects}       | Number of connections made    |
| %{num\_redirects}      | Number of redirects           |
| %{remote\_ip}          | Remote IP address             |
| %{remote\_port}        | Remote port number            |
| %{size\_download}      | Bytes downloaded              |
| %{size\_header}        | Bytes of headers downloaded   |
| %{size\_request}       | Bytes sent in request         |
| %{size\_upload}        | Bytes uploaded                |
| %{speed\_download}     | Download speed (bytes/sec)    |
| %{speed\_upload}       | Upload speed (bytes/sec)      |
| %{time\_appconnect}    | SSL/TLS handshake time        |
| %{time\_connect}       | Connection establishment time |
| %{time\_namelookup}    | DNS lookup time               |
| %{time\_pretransfer}   | Pre-transfer time             |
| %{time\_redirect}      | Redirect time                 |
| %{time\_starttransfer} | Time to first byte            |
| %{time\_total}         | Total time                    |
| %{url\_effective}      | Final URL after redirects     |