Multipart

class Multipart(pointer: <Error class: unknown class><<Error class: unknown class>>)

Represents a multipart HTTP message body, parsed according to the syntax of RFC 2046.

Of particular interest to HTTP are multipart/byte-ranges and multipart/form-data,

Although the headers of a #SoupMultipart body part will contain the full headers from that body part, libsoup does not interpret them according to MIME rules. For example, each body part is assumed to have "binary" Content-Transfer-Encoding, even if its headers explicitly state otherwise. In other words, don't try to use #SoupMultipart for handling real MIME multiparts.

Skipped during bindings generation

  • parameter headers: headers: Out parameter is not supported

  • parameter dest_body: dest_body: Out parameter is not supported

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val soupMultipartPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun appendFormFile(controlName: String, filename: String? = null, contentType: String? = null, body: <Error class: unknown class>)

Adds a new MIME part containing @body to @multipart

Link copied to clipboard
fun appendFormString(controlName: String, data: String)

Adds a new MIME part containing @data to @multipart.

Link copied to clipboard
fun appendPart(headers: MessageHeaders, body: <Error class: unknown class>)

Adds a new MIME part to @multipart with the given headers and body.

Link copied to clipboard
fun free()

Frees @multipart.

Link copied to clipboard
fun getLength(): <Error class: unknown class>

Gets the number of body parts in @multipart.