Liking cljdoc? Tell your friends :D
Clojure only.

hato.multipart

Core implementation of an HTTP client wrapping JDK11's java.net.http.HttpClient.

Core implementation of an HTTP client wrapping JDK11's java.net.http.HttpClient.
raw docstring

bodyclj

(body ms b)

Returns an InputStream from the multipart inputs.

This is achieved by writing all the inputs to an output stream which is piped back into an InputStream, hopefully to avoid making a copy of everything (which could be the case if we read all the bytes and used a ByteArrayOutputStream instead).

Output looks something like:

--hatoBoundary.... Content-Disposition: form-data; name="title" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

Some Content --hatoBoundary.... ...more components --hatoBoundary....--

Returns an InputStream from the multipart inputs.

This is achieved by writing all the inputs to an output stream which is piped
back into an InputStream, hopefully to avoid making a copy of everything (which could
be the case if we read all the bytes and used a ByteArrayOutputStream instead).

Output looks something like:

--hatoBoundary....
Content-Disposition: form-data; name="title"
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Some Content
--hatoBoundary....
...more components
--hatoBoundary....--
sourceraw docstring

boundaryclj

(boundary)

Creates a boundary string compliant with RFC2046

See https://www.ietf.org/rfc/rfc2046.txt

Creates a boundary string compliant with RFC2046

See https://www.ietf.org/rfc/rfc2046.txt
sourceraw docstring

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

× close