Skip to content

HttpServerCapabilities

Defined in: src/client/capabilities.ts:27

HTTP server capability discovery.

Mirrors Python’s http_capabilities(): probes OPTIONS {prefix}/health and reads three response headers:

  • VGI-Max-Request-Bytes — server-enforced inline request cap
  • VGI-Upload-URL-Support — “true” when the server vends upload URLs
  • VGI-Max-Upload-Bytes — cap on out-of-band upload size
  • VGI-Max-Response-Bytes — server-side response cap
  • VGI-Accept-Max-Response-Bytes-Support — negotiated client cap support

Honours Cache-Control: max-age=N for refresh scheduling.

acceptMaxResponseBytesSupport: boolean;

Defined in: src/client/capabilities.ts:37

Whether the server honors VGI-Accept-Max-Response-Bytes.


cacheExpiresAt: number | null;

Defined in: src/client/capabilities.ts:59

Monotonic-time-ish epoch (ms) at which this snapshot should be re-probed.


externalizationEnabled: boolean;

Defined in: src/client/capabilities.ts:42

Whether the server has a storage backend wired up, and can therefore rescue an oversize response by externalizing it.


maxExternalizedResponseBytes: number | null;

Defined in: src/client/capabilities.ts:39

Cap on the externalized bytes of one response, when advertised.


maxRequestBytes: number | null;

Defined in: src/client/capabilities.ts:29

Server’s advertised max inline request body size (bytes).


maxResponseBytes: number | null;

Defined in: src/client/capabilities.ts:35

Server/hosting maximum response bytes, when advertised.


maxUploadBytes: number | null;

Defined in: src/client/capabilities.ts:33

Cap on the size of an externalized upload (bytes).


stickyDefaultTtl: number | null;

Defined in: src/client/capabilities.ts:53

Seconds a session lives when opened without an explicit TTL.


stickyEchoHeaders: string[];

Defined in: src/client/capabilities.ts:57

Header names the server tells clients to echo for the life of a session. The values arrive per session as VGI-Echo-<name> response headers; this is the introspectable list.


stickyEnabled: boolean;

Defined in: src/client/capabilities.ts:51

Whether the server honours VGI-Session sticky sessions.


supportedEncodings: string[];

Defined in: src/client/capabilities.ts:49

Content encodings the server can decode on requests and produce on responses, as the lowercase wire tokens (zstd, gzip, identity).

Present-but-empty is a real answer — “this server compresses nothing” — and distinct from an absent header, which means a server predating the advertisement and is read as zstd-only.


uploadUrlSupport: boolean;

Defined in: src/client/capabilities.ts:31

Whether the server vends upload URLs via __upload_url__/init.