Follow a bounded redirect chain

Observe that a redirect chain is a sequence of separate exchanges, not one response.

  • redirects
  • diagnostics

Prediction

Each redirect resolves one Location value and creates another request. A repeated target should be visible before a fixed hop limit stops following.

Controlled observation

The future UI will display a fixed three-hop chain and one fixed cycle fixture, including every intermediate response.

Explanation

The final address alone hides redirect status, caching, and method choices made at earlier hops.

Controlled exercise

Run this observation

Compare the final URL with the requested fixed hop count; Fetch does not expose every intermediate response.

Ready. No request has run.

Controlled request

Method
GET
URL
https://lab.httpclarity.com/v1/redirect-chain/1
Permitted headers
None
Body
None

Browser-observed response

No response yet. The explanation and examples remain useful without JavaScript or the Worker.

Timing is browser elapsed time. Fetch hides Set-Cookie, raw wire bytes, reliable compressed size, and some redirect details.

Portable examples

cURL

              'curl' '--include' '--request' 'GET' 'https://lab.httpclarity.com/v1/redirect-chain/1'
            

Fetch API

              const response = await fetch("https://lab.httpclarity.com/v1/redirect-chain/1", {
  "method": "GET"
});
console.log(response.status, await response.text());
            

PHP

              <?php
$options = ['http' => [
    'method' => 'GET',
    'ignore_errors' => true,
]];
$context = stream_context_create($options);
$body = file_get_contents('https://lab.httpclarity.com/v1/redirect-chain/1', false, $context);
var_dump($http_response_header, $body);
            

Need a full API client? Copy the generated cURL command, then import it in Hoppscotch. HTTPClarity sends no request data to Hoppscotch.

Continue in Hoppscotch (opens in a new tab)

Primary sources