MultiPartData

interface MultiPartData

Represents a multipart data stream that could be received from a call

Types

Empty

object Empty : MultiPartData

An empty multipart data stream

Functions

readPart

abstract suspend fun readPart(): PartData?

Reads next part data or null if end of multipart stream encountered

Extension Functions

forEachPart

suspend fun MultiPartData.forEachPart(
    partHandler: suspend (PartData) -> Unit
): Unit

Parse multipart data stream and invoke partHandler for each PartData encountered

readAllParts

suspend fun MultiPartData.readAllParts(): List<PartData>

Parse multipart data stream and put all parts into a list

Inheritors

CIOMultipartDataBase

class CIOMultipartDataBase : MultiPartData, CoroutineScope

Represents a multipart data object that does parse and convert parts to ktor’s PartData

Empty

object Empty : MultiPartData

An empty multipart data stream