
com.icerockdev.api.request.Parameters.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of web-utils Show documentation
Show all versions of web-utils Show documentation
Ktor based web-server with validation and internationalization
The newest version!
package com.icerockdev.api.request
import io.ktor.http.Parameters
fun Parameters.parseFilters(): HashMap {
val parameters = this
val filters: HashMap = hashMapOf()
parameters.entries().forEach {
if (it.key.contains("filters.")) {
val key = it.key.substringAfter(".").uppercase()
val value = parameters[it.key]
if (value != null) {
filters[key] = value
}
}
}
return filters
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy