query

abstract fun <T : Any> query(name: String, type: KClass<T>): T?

The query parameter name as type, or null when the request leaves it out.