GET method

The HTTP GET method retrieves a document or a fragment of a document. When combined with a selector range unit, it returns the matched element instead of the full page.

When to reach for it

Use GET to read content. A request without a selector range returns the whole document. A request with a selector range returns the matched fragment as a 206 Partial Content response with a Content-Range header identifying the element.

All GET requests are subject to authorization.

Examples

Retrieve a single element

Given a document with a heading and a paragraph, retrieve the heading alone:

GET /get-selector-test.html
Range: selector=h1
HTTP/1.1 206
Content-Range: selector=h1

<h1>Introduction</h1>

Resource not found

If the document does not exist, the server returns 404 Not Found:

GET /get-nonexistent-page.html
HTTP/1.1 404

Selector matches nothing

If the document exists but the CSS selector matches no element, the server returns 416 Range Not Satisfiable:

GET /get-no-match-test.html
Range: selector=h1
HTTP/1.1 416

Directory requests

A directory is served through its index.html: requesting /blog/ returns the document stored at /blog/index.html.

If you request a directory without the trailing slash — /blog — and that directory has an index.html you are allowed to read, the server replies with 301 Moved Permanently and a Location of the trailing-slash form (/blog/), preserving any query string. Following the redirect serves the index. This keeps the page's address canonical so that relative links and assets within it resolve correctly, and means clients that strip trailing slashes still reach the index instead of a 404.

A slash-less path that has no readable index.html is returned as a normal 404 Not Found (no redirect), and a path whose final segment looks like a file — it contains a ., such as /style.css — is always treated as a file request, never redirected.

Caching

Every 200 OK carries an ETag (and, where applicable, Last-Modified), so clients and caches can revalidate cheaply with If-None-Match — an unchanged resource returns 304 Not Modified.

Static assets served verbatim from storage — CSS, JavaScript, images, and fonts — are additionally sent with Cache-Control: public, max-age=300. This lets browsers, CDNs, and any caching proxy in front of the platform store them for up to five minutes instead of re-fetching on every request. An edit to a static asset is therefore picked up by shared caches once that window lapses (and immediately on a cache that revalidates via the ETag). HTML pages and live event streams are not cached this way: composed pages use a much shorter shared-cache floor (or stay private when they depend on who is asking), and SSE streams are never cached.

Error cases

Condition Status
Document does not exist 404 Not Found
Selector matches no element 416 Range Not Satisfiable
Authorization denied 403 Forbidden

See also