clj-http.multipart documentation

Namespace used for clj-http to create multipart entities and bodies.

create-multipart-entity

(create-multipart-entity multipart)
Takes a multipart vector of maps and creates a MultipartEntity with each
map added as a part, depending on the type of content.

make-byte-array-body

(make-byte-array-body {:keys [name mime-type content]})
Create a ByteArrayBody object from the given map, requiring at least :content
and :name.

make-file-body

(make-file-body {:keys [name mime-type content encoding]})
Create a FileBody object from the given map, requiring at least :content

make-input-stream-body

(make-input-stream-body {:keys [name mime-type content]})
Create an InputStreamBody object from the given map, requiring at least
:content and :name.

make-string-body

(make-string-body {:keys [mime-type content encoding]})
Create a StringBody object from the given map, requiring at least :content.
If :encoding is specified, it will be created using the Charset for
that encoding.