setBodyMultipart
Sets a multipart/form-data body on the request.
Usage:
client.post("upload") {
setBodyMultipart {
append("title", "My photo")
appendFile("file", File("/path/to/photo.jpg"), "image/jpeg")
}
}Content copied to clipboard