public static class MultipartEvent.MultipartPart
extends 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.
MultipartEvent.Epilogue, MultipartEvent.MultipartPart, MultipartEvent.Preamble| Constructor and Description |
|---|
MultipartPart(kotlinx.coroutines.Deferred<io.ktor.http.cio.HttpHeadersMap> headers,
kotlinx.coroutines.io.ByteReadChannel body)
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.
|
| Modifier and Type | Method and Description |
|---|---|
kotlinx.coroutines.io.ByteReadChannel |
getBody()
a channel of part content
|
kotlinx.coroutines.Deferred<io.ktor.http.cio.HttpHeadersMap> |
getHeaders()
deferred that will be completed once will be parsed
|
void |
release()
Release underlying data/packet.
|
releasepublic MultipartPart(kotlinx.coroutines.Deferred<io.ktor.http.cio.HttpHeadersMap> headers,
kotlinx.coroutines.io.ByteReadChannel body)
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.
headers - deferred that will be completed once will be parsedbody - a channel of part contentpublic void release()
Release underlying data/packet.
public kotlinx.coroutines.Deferred<io.ktor.http.cio.HttpHeadersMap> getHeaders()
deferred that will be completed once will be parsed
public kotlinx.coroutines.io.ByteReadChannel getBody()
a channel of part content