Liking cljdoc? Tell your friends :D

hyper.client-params

Client parameters are special symbols that can appear in the body of the hyper.core/action macro, allowing server-side event handlers to access data collected from the client event handler.

The built-in parameters are $value, $checked, $key, $detail, $form-data, and the file-upload params $form and $files.

Most params are JSON-encoded into the @post() request — but binary file content cannot ride that channel. A param marked :multipart? true instead switches the action's transport to a multipart/form-data upload (see hyper.uploads): its :js must evaluate to a FormData object (the request body), and its :key is the key under which the parsed upload is bound on the server ("form" or "files").

Client parameters are special symbols that can appear in the body
of the hyper.core/action macro, allowing server-side event handlers
to access data collected from the client event handler.

The built-in parameters are $value, $checked, $key, $detail, $form-data,
and the file-upload params $form and $files.

Most params are JSON-encoded into the @post() request — but binary file
content cannot ride that channel.  A param marked `:multipart? true` instead
switches the action's transport to a multipart/form-data upload (see
hyper.uploads): its `:js` must evaluate to a `FormData` object (the request
body), and its `:key` is the key under which the parsed upload is bound on
the server ("form" or "files").
raw docstring

client-paramcljmultimethod

Maps special symbols, with a leading $, to a definition.

Each definition is a map with two keys:

:js - (string) JavaScript run in the handler to extract the value :key - (string) Key used in the URL query string to send the value to the server.

Applications may provide methods for additional such symbols. Note that such methods must be provided before actions that make use of the symbols.

Maps special symbols, with a leading $, to a definition.

Each definition is a map with two keys:

:js - (string) JavaScript run in the handler to extract the value
:key - (string) Key used in the URL query string to send the value to the server.

Applications may provide methods for additional such symbols.
Note that such methods must be provided before actions that make
use of the symbols.
sourceraw docstring

defined-client-paramsclj

(defined-client-params)

Returns a set of the symbols of available client parameters.

Returns a set of the symbols of available client parameters.
sourceraw docstring

multipart-param?clj

(multipart-param? sym)

True when sym is a client param whose transport is a multipart/form-data upload (its definition carries :multipart? true) rather than the default JSON @post() channel. File params ($form, $files) are multipart.

True when `sym` is a client param whose transport is a multipart/form-data
upload (its definition carries `:multipart? true`) rather than the default
JSON @post() channel.  File params ($form, $files) are multipart.
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