``` @InternalSerializationApi suspend inline f...
# ktor
d
Copy code
@InternalSerializationApi
    suspend inline fun  <reified T, reified K>GETRequest(
        path: String,
        success: (main: T) -> Unit,
        error: (error: K) -> Unit,
        noinline genericError: (error: Throwable) -> Unit
    ){
        val builder = HttpRequestBuilder()
        builder.method = HttpMethod.Get
        builder.url {
            takeFrom(baseUrl)
            encodedPath = encodedPath.let { startingPath ->
                path(path)
                return@let startingPath + encodedPath.substring(1)
            }
        }
        try {

//            val classmodel =  as? KClass<*>
            val serializer = classmodel?.serializer()
            //not primitive type
            val result: String = httpApiClient!!.request(builder)
            success.invoke(Json.decodeFromString(serializer!!, result) as T)

        } catch (pipeline: ReceivePipelineException) {
            throw pipeline.cause
        }
    }
Need some help here, how can we use the serializer if the Model definition is unknown, and we just passed
T