Liking cljdoc? Tell your friends :D

aleph.http.multipart


boundaryclj

(boundary)
source

decode-requestclj

(decode-request req)
(decode-request {:keys [body] :as req}
                {:keys [body-buffer-size memory-limit]
                 :or {body-buffer-size 65536
                      memory-limit DefaultHttpDataFactory/MINSIZE}})

Takes a ring request and returns a manifold stream which yields parts of the mutlipart/form-data encoded body. In case the size of a part content exceeds :memory-limit limit (16KB by default), corresponding payload would be written to a temp file. Check :memory? flag to know whether content might be read directly from :content or should be fetched from the file specified in :file.

Note, that if your handler works with multipart requests only, it's better to set :raw-stream? to true to avoid additional input stream coercion.

Takes a ring request and returns a manifold stream which yields
parts of the mutlipart/form-data encoded body. In case the size of
a part content exceeds `:memory-limit` limit (16KB by default),
corresponding payload would be written to a temp file. Check `:memory?`
flag to know whether content might be read directly from `:content` or
should be fetched from the file specified in `:file`.

Note, that if your handler works with multipart requests only,
it's better to set `:raw-stream?` to `true` to avoid additional
input stream coercion.
sourceraw docstring

encode-bodycljdeprecated

(encode-body parts)
(encode-body boundary parts)
source

encode-partclj

(encode-part {:keys [part-name content mime-type charset transfer-encoding name]
              :as part})

Generates the byte representation of a part for the bytebuffer

Generates the byte representation of a part for the bytebuffer
sourceraw docstring

encode-requestclj

(encode-request req parts)
source

http-data->mapcljmultimethod

source

mime-type-descriptorclj

(mime-type-descriptor mime-type encoding)
source

part-headersclj

(part-headers part-name mime-type transfer-encoding name)
source

populate-partclj

(populate-part {:keys [part-name content mime-type charset transfer-encoding
                       name]})

Generates a part map of the appropriate format

Generates a part map of the appropriate format
sourceraw docstring

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

× close