# dev.inmo.micro_utils.ktor.client

# Package-level declarations

## Types

OnUploadCallback
Link copied to clipboard
typealias OnUploadCallback = suspend (uploaded: Long , count: Long ) -> Unit
UniUploadFileInfo
Link copied to clipboard
data class UniUploadFileInfo (val fileName: FileName , val mimeType: String , val inputAllocator: LambdaInputProvider )

## Functions

bodyOrNull
Link copied to clipboard
inline suspend fun < T : Any > <Error class: unknown class>. bodyOrNull (statusFilter: (<Error class: unknown class>) -> Boolean = { it.status == HttpStatusCode.OK }): <Error class: unknown class>?
bodyOrNullOnNoContent
Link copied to clipboard
inline suspend fun < T : Any > <Error class: unknown class>. bodyOrNullOnNoContent (): <Error class: unknown class>
createStandardWebsocketFlow
Link copied to clipboard
inline fun < T : Any > <Error class: unknown class>. createStandardWebsocketFlow (url: String , noinline checkReconnection: suspend ( Throwable ?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow< T >
inputProvider
Link copied to clipboard
fun MPPFile . inputProvider (): <Error class: unknown class>
inputProviderSync
Link copied to clipboard
fun MPPFile . inputProviderSync (): <Error class: unknown class>
openBaseWebSocketFlow
Link copied to clipboard
inline fun < T : Any > openBaseWebSocketFlow (noinline checkReconnection: suspend ( Throwable ?) -> Boolean = { true }, noinline webSocketSessionRequest: suspend SendChannel< T >.() -> Unit ): Flow< T >
openSecureWebSocketFlow
Link copied to clipboard
inline fun < T : Any > <Error class: unknown class>. openSecureWebSocketFlow (url: String , noinline checkReconnection: suspend ( Throwable ?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow< T >
openWebSocketFlow
Link copied to clipboard
inline fun < T : Any > <Error class: unknown class>. openWebSocketFlow (url: String , noinline checkReconnection: suspend ( Throwable ?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow< T >
inline fun < T : Any > <Error class: unknown class>. openWebSocketFlow (url: String , useSecureConnection: Boolean , noinline checkReconnection: suspend ( Throwable ?) -> Boolean = { true }, noinline requestBuilder: <Error class: unknown class>.() -> Unit = {}): Flow< T >
tempUpload
Link copied to clipboard
suspend fun tempUpload (fullTempUploadDraftPath: String , file: MPPFile , onUpload: <Error class: unknown class>): TemporalFileId
tempUpload
Link copied to clipboard
expect suspend fun <Error class: unknown class>. tempUpload (fullTempUploadDraftPath: String , file: MPPFile , onUpload: <Error class: unknown class> = ProgressListener { _, _ -> }): TemporalFileId
actual suspend fun <Error class: unknown class>. tempUpload (fullTempUploadDraftPath: String , file: MPPFile , onUpload: <Error class: unknown class>): TemporalFileId
actual suspend fun <Error class: unknown class>. tempUpload (fullTempUploadDraftPath: String , file: MPPFile , onUpload: <Error class: unknown class>): TemporalFileId
throwOnUnsuccess
Link copied to clipboard
inline fun <Error class: unknown class>. throwOnUnsuccess (unsuccessMessage: () -> String )
uniUpload
Link copied to clipboard
expect suspend fun < T > <Error class: unknown class>. uniUpload (url: String , data: Map < String , Any >, resultDeserializer: DeserializationStrategy< T >, headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: <Error class: unknown class> = ProgressListener { _, _ -> }): T ?

Will execute submitting of multipart data request

suspend fun < T > <Error class: unknown class>. uniUpload (url: String , file: MPPFile , resultDeserializer: DeserializationStrategy< T >, additionalData: Map < String , Any > = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: <Error class: unknown class> = ProgressListener { _, _ -> }): T ?

Additional variant of uniUpload which will unify sending of some MPPFile with the server

suspend fun < T > <Error class: unknown class>. uniUpload (url: String , info: UniUploadFileInfo , resultDeserializer: DeserializationStrategy< T >, additionalData: Map < String , Any > = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: <Error class: unknown class> = ProgressListener { _, _ -> }): T ?

Additional variant of uniUpload which will unify sending of some UniUploadFileInfo with the server

suspend fun < T > <Error class: unknown class>. uniUpload (url: String , fileName: FileName , mimeType: String , inputAllocator: LambdaInputProvider , resultDeserializer: DeserializationStrategy< T >, additionalData: Map < String , Any > = emptyMap(), headers: <Error class: unknown class> = Headers.Empty, stringFormat: StringFormat = Json, onUpload: <Error class: unknown class> = ProgressListener { _, _ -> }): T ?

Additional variant of uniUpload which will unify sending of some UniUploadFileInfo (built from fileName, mimeType and inputAllocator) with the server