Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.gateway.server.http

Request parsing and JSON responses shared by the gateway route handlers.

Request parsing and JSON responses shared by the gateway route handlers.
raw docstring

archived-400clj

(archived-400)

The answer to an archived parameter naming a view that does not exist.

The answer to an `archived` parameter naming a view that does not exist.
sourceraw docstring

body-jsonclj

(body-json request)
(body-json request parse)

The JSON body of request as data, or nil without a body. A body above json-body-max-chars throws. It also puts [status type message] into the ::refusal atom of the request, so the gateway answers 413 when the handler catches the error.

The JSON body of `request` as data, or nil without a body. A body above
[[json-body-max-chars]] throws. It also puts `[status type message]` into the
`::refusal` atom of the request, so the gateway answers 413 when the handler
catches the error.
sourceraw docstring

canonical-json-responseclj

(canonical-json-response body)

A 200 JSON response for a body that is already in the canonical wire shape, such as string keys around rows from wire/canonical. It skips the second walk of json-str.

A 200 JSON response for a `body` that is already in the canonical wire shape, such as
string keys around rows from `wire/canonical`. It skips the second walk of `json-str`.
sourceraw docstring

client-extension-error-responseclj

(client-extension-error-response status code message field extra)

Show the failed declaration field, not the contents of the declaration.

Show the failed declaration field, not the contents of the declaration.
sourceraw docstring

compressed-media-type?clj

(compressed-media-type? content-type)

True when the gateway compresses an answer of content-type. Parameters do not count.

True when the gateway compresses an answer of `content-type`. Parameters do not count.
sourceraw docstring

compressed-media-typesclj

The media types whose answers the gateway compresses: text. Jetty's own default compresses each type that it does not know as compressed, and that set had audio/wav, audio/mp4, video/webm, image/heic and application/octet-stream: a 206 answer to a Range request went out as gzip without a length, and a snapshot, which is zstd, was deflated again. A type that this set does not name stays plain, which is always correct. The vnd.vis types are the JSON attachments of the contract: a diff, an app and a live view record. application/vnd.vis.live+json is the older record type, which a store still has.

The media types whose answers the gateway compresses: text. Jetty's own default
compresses each type that it does not know as compressed, and that set had
`audio/wav`, `audio/mp4`, `video/webm`, `image/heic` and
`application/octet-stream`: a 206 answer to a `Range` request went out as gzip
without a length, and a snapshot, which is zstd, was deflated again. A type that
this set does not name stays plain, which is always correct. The `vnd.vis` types
are the JSON attachments of the contract: a diff, an app and a live view record.
`application/vnd.vis.live+json` is the older record type, which a store still has.
sourceraw docstring

error-responseclj

(error-response status type message & {:as extra})
source

group-404clj

(group-404 gid-str)
source

json-body-max-charsclj

The most characters of a JSON request body (64 Mi), the same bound as an inflated gzip body. Without it, one request could fill the heap of the gateway.

The most characters of a JSON request body (64 Mi), the same bound as an inflated
gzip body. Without it, one request could fill the heap of the gateway.
sourceraw docstring

json-responseclj

(json-response body)
(json-response status body)
source

path-sidclj

(path-sid request)
source

public-error-responseclj

(public-error-response status type message & {:as extra})

Build an error whose message is safe for clients to display.

Build an error whose message is safe for clients to display.
sourceraw docstring

query-archivedclj

(query-archived request)

The archive view a request asks for, or :invalid when it names one this gateway does not have. Absent or blank is :exclude: a caller that never heard of the archive reads the active list.

The archive view a request asks for, or `:invalid` when it names one this
gateway does not have. Absent or blank is `:exclude`: a caller that never
heard of the archive reads the active list.
sourceraw docstring

query-longclj

(query-long request k)

Long value of query param k, or nil when it is absent, blank or unparsable.

Ring hands back a VECTOR when a param repeats (?limit=1&limit=2), so read the LAST value — a duplicated param is a client bug, not a ClassCastException.

Range policy belongs to the caller: 0 and negatives come back as themselves.

Long value of query param `k`, or nil when it is absent, blank or unparsable.

Ring hands back a VECTOR when a param repeats (`?limit=1&limit=2`), so read the
LAST value — a duplicated param is a client bug, not a ClassCastException.

Range policy belongs to the caller: 0 and negatives come back as themselves.
sourceraw docstring

query-session-idsclj

(query-session-ids request k)

A comma-separated list of session ids from one query parameter, as a set.

Absent, blank and "only commas" all mean the empty set: an overlay a device does not have is not an error, it is simply no overlay.

A comma-separated list of session ids from one query parameter, as a set.

Absent, blank and "only commas" all mean the empty set: an overlay a device
does not have is not an error, it is simply no overlay.
sourceraw docstring

query-strclj

(query-str request k)

Trimmed string value of query param k, or nil when it is absent or blank. Same duplicate-param rule as query-long: the LAST value wins.

Trimmed string value of query param `k`, or nil when it is absent or blank.
Same duplicate-param rule as [[query-long]]: the LAST value wins.
sourceraw docstring

session-404clj

(session-404 sid-str)
source

session-archived-409clj

(session-archived-409 sid)

The answer to a WRITE aimed at an archived session. The archive is READ-ONLY and the gateway is where that holds: the app and the TUI disable their controls, so a human never learns it from a refusal, but a stale screen or an SDK caller reaches these routes anyway.

The answer to a WRITE aimed at an archived session. The archive is READ-ONLY and
the gateway is where that holds: the app and the TUI disable their controls, so a
human never learns it from a refusal, but a stale screen or an SDK caller reaches
these routes anyway.
sourceraw docstring

session-busy-409clj

(session-busy-409 sid)

The answer to an archive aimed at work in flight: a running turn, a turn queued behind it, or an input prompt parked on the operator. sid names the session that is busy, which for a GROUP is the member holding the whole shelf up.

The answer to an archive aimed at work in flight: a running turn, a turn queued
behind it, or an input prompt parked on the operator. `sid` names the session that
is busy, which for a GROUP is the member holding the whole shelf up.
sourceraw docstring

weak-etagclj

(weak-etag parts)

WEAK conditional-GET validator over parts: SHA-256 of their canonical JSON.

Weak because the callers hash CONTENT and drop per-request clock samples (server_time_ms) — two answers may differ in bytes while rendering identically, which is exactly the case a 304 exists for.

WEAK conditional-GET validator over `parts`: SHA-256 of their canonical JSON.

Weak because the callers hash CONTENT and drop per-request clock samples
(`server_time_ms`) — two answers may differ in bytes while rendering
identically, which is exactly the case a 304 exists for.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close