(build-scoped-url search pathname resource-id new-params)Build the url from the resource's params, scoped by its resource-id. A named resource owns
<id>.-prefixed keys (e.g. tasks.sort=start); an unnamed (blank id) resource owns the bare
keys and writes them without a prefix (sort=start).
Build the url from the resource's params, scoped by its resource-id. A named resource owns `<id>.`-prefixed keys (e.g. tasks.sort=start); an unnamed (blank id) resource owns the bare keys and writes them without a prefix (sort=start).
(canonicalize-query q)Public function that ensures all query keys are keywords and values are non-blank strings. Entries whose value is nil or blank are dropped
Public function that ensures all query keys are keywords and values are non-blank strings. Entries whose value is nil or blank are dropped
(owned-url-keys resource-id all-keys)The keys in all-keys a resource owns: its <id>.-prefixed keys when named, or the bare
undotted keys when unnamed (blank id). Bare and namespaced keys never overlap, so an unnamed
root resource and named siblings can share one URL without colliding.
The keys in `all-keys` a resource owns: its `<id>.`-prefixed keys when named, or the bare undotted keys when unnamed (blank id). Bare and namespaced keys never overlap, so an unnamed root resource and named siblings can share one URL without colliding.
(params->url params pathname)Render params onto pathname, dropping the ? when the query is empty.
Render `params` onto `pathname`, dropping the ? when the query is empty.
(request {:keys [endpoint segment method query body request-id]})build a request value for the executor from the parts provided .e.g. -> {:method "GET" :url "/api/tasks?requestId=tasks:1&sort=owner&direction=asc"}
build a request value for the executor from the parts provided
.e.g. -> {:method "GET" :url "/api/tasks?requestId=tasks:1&sort=owner&direction=asc"}(scope-params! params resource-id new-params)Replace the keys resource-id owns in params with new-params, each prefixed by the
resource scope. Mutates and returns params.
Replace the keys `resource-id` owns in `params` with `new-params`, each prefixed by the resource scope. Mutates and returns `params`.
(url-prefix resource-id)The URL key prefix for a resource id: <id>. for a named resource, or "" for the unnamed
root resource, whose keys are bare.
The URL key prefix for a resource id: `<id>.` for a named resource, or "" for the unnamed root resource, whose keys are bare.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |