dev.pellet.server.routing.http.PelletHTTPRoute.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pellet-server Show documentation
Show all versions of pellet-server Show documentation
An opinionated Kotlin web framework, with best-practices built-in
package dev.pellet.server.routing.http
import dev.pellet.server.codec.http.HTTPMethod
import java.net.URI
data class PelletHTTPRoute(
val method: HTTPMethod,
internal val uri: URI,
val handler: PelletHTTPRouteHandling
) {
val scheme: String?
get() = uri.scheme
val host: String?
get() = uri.host
val port: Int?
get() = when {
uri.port > 0 -> uri.port
else -> null
}
val path: String
get() = uri.path
val query: String?
get() = uri.query
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy