MultipartPart

class MultipartPart : MultipartEvent

Represents a multipart part. There could be any number of parts in a multipart stream. Please note that it is important to consume body otherwise multipart parser could get stuck (suspend) so you will not receive more events.

Constructors

<init>

MultipartPart(
    headers: Deferred<HttpHeadersMap>,
    body: ByteReadChannel)

Represents a multipart part. There could be any number of parts in a multipart stream. Please note that it is important to consume body otherwise multipart parser could get stuck (suspend) so you will not receive more events.

Properties

body

val body: ByteReadChannel

a channel of part content

headers

val headers: Deferred<HttpHeadersMap>

deferred that will be completed once will be parsed

Functions

release

fun release(): Unit

Release underlying data/packet.