Observe selected HTTP status codes
Observe how fixed success, redirect, client-error, and rate-limit statuses appear to a client.
- status codes
- messages
Prediction
Changing the exact status changes the response semantics even when the client and target stay the same. A HEAD request should expose metadata without response content.
Controlled observation
The future control will select only reviewed fixed responses for 200, 404, and
429; it will show status, fields, and bounded content separately.
Explanation
The first digit gives a class, while the complete code defines the result. An application message cannot redefine that HTTP meaning.
Controlled exercise
Run this observation
Compare the HTTP status, response content, and HEAD's absent content.
Ready. No request has run.
Controlled request
- Method
- GET
- URL
https://lab.httpclarity.com/v1/status/200- 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/status/200'
Fetch API
const response = await fetch("https://lab.httpclarity.com/v1/status/200", {
"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/status/200', 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)