Liking cljdoc? Tell your friends :D

io.pedestal.http.body-params


add-parserclj

(add-parser parser-map content-type parser-fn)
source

add-ring-middlewareclj

(add-ring-middleware parser-map content-type middleware)
source

body-paramsclj

(body-params)
(body-params parser-map)
source

custom-edn-parserclj

(custom-edn-parser & options)

Return an edn-parser fn that, given a request, will read the body of that request with edn/read. options are key-val pairs that will be passed as a hash-map to edn/read.

Return an edn-parser fn that, given a request, will read the body of that
request with `edn/read`. options are key-val pairs that will be passed as a
hash-map to `edn/read`.
sourceraw docstring

custom-json-parserclj

(custom-json-parser & options)

Return a json-parser fn that, given a request, will read the body of that request with json/read. options are key-val pairs that will be passed along to json/read.

Return a json-parser fn that, given a request, will read the body of that
request with `json/read`. options are key-val pairs that will be passed along
to `json/read`.
sourceraw docstring

custom-transit-parserclj

(custom-transit-parser & options)

Return a transit-parser fn that, given a request, will read the body of that request with transit/read. options is a sequence to pass to transit/reader along with the body of the request.

Return a transit-parser fn that, given a request, will read the
body of that request with `transit/read`. options is a sequence to
pass to transit/reader along with the body of the request.
sourceraw docstring

default-parser-mapclj

(default-parser-map & parser-options)

Return a map of MIME-type to parsers. Included types are edn, json and form-encoding. parser-options are key-val pairs, valid options are:

:edn-options A hash-map of options to be used when invoking edn/read. :json-options A hash-map of options to be used when invoking json/parse-stream. :transit-options A vector of options to be used when invoking transit/reader - must apply to both json and msgpack

Examples:

(default-parser-map :json-options {:key-fn keyword}) ;; This parser-map would parse the json body '{"foo": "bar"}' as ;; {:foo "bar"}

(default-parser-map :edn-options {:readers data-readers}) ;; This parser-map will parse edn bodies using any custom edn readers you ;; define (in a data_readers.clj file, for example.)

(default-parser-map :transit-options [{:handlers {"custom/model" custom-model-read-handler}}]) ;; This parser-map will parse the transit body using a handler defined by ;; custom-model-read-handler.

Return a map of MIME-type to parsers. Included types are edn, json and
form-encoding. parser-options are key-val pairs, valid options are:

  :edn-options A hash-map of options to be used when invoking `edn/read`.
  :json-options A hash-map of options to be used when invoking `json/parse-stream`.
  :transit-options A vector of options to be used when invoking `transit/reader` - must apply to both json and msgpack

Examples:

(default-parser-map :json-options {:key-fn keyword})
;; This parser-map would parse the json body '{"foo": "bar"}' as
;; {:foo "bar"}

(default-parser-map :edn-options {:readers *data-readers*})
;; This parser-map will parse edn bodies using any custom edn readers you
;; define (in a data_readers.clj file, for example.)

(default-parser-map :transit-options [{:handlers {"custom/model" custom-model-read-handler}}])
;; This parser-map will parse the transit body using a handler defined by
;; custom-model-read-handler.
sourceraw docstring

edn-parserclj

Take a request and parse its body as edn.

Take a request and parse its body as edn.
sourceraw docstring

form-parserclj

(form-parser request)

Take a request and parse its body as a form.

Take a request and parse its body as a form.
sourceraw docstring

json-parserclj

Take a request and parse its body as json.

Take a request and parse its body as json.
sourceraw docstring

transit-parserclj

Take a request and parse its body as transit.

Take a request and parse its body as transit.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close