formData

fun formData(vararg values: FormPart<*>): List<PartData>(source)

Builds a multipart form from values.

Each FormPart.key is emitted as a quoted-string in the Content-Disposition: form-data; name=... header, matching the WHATWG HTML form-submission specification used by browsers, curl, OkHttp and other major clients.

Example: Upload a file.

Report a problem


inline fun formData(block: FormBuilder.() -> Unit): List<PartData>(source)

Build multipart form using block function.

Report a problem