wrapResponse

abstract suspend fun <PRequest : Any> wrapResponse(returnTypeName: String, requestFunction: suspend () -> <ERROR CLASS><<ERROR CLASS>, <ERROR CLASS>>): Any

Return

the wrapped response

Parameters

requestFunction

a suspend function that will return a typeInfo of Ktor's requested type and the HttpResponse

returnTypeName

is the qualified name of the outer type of the return type. e.g. for Flow it will be kotlinx.coroutines.flow.Flow