All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.pellet.server.routing.http.PelletHTTPRoute.kt Maven / Gradle / Ivy

There is a newer version: 0.0.16
Show newest version
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