com.lightningkite.lightningserver.core.ServerPathGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-core Show documentation
Show all versions of server-core Show documentation
A set of tools to fill in/replace what Ktor is lacking in.
The newest version!
package com.lightningkite.lightningserver.core
import com.lightningkite.lightningserver.http.*
abstract class ServerPathGroup(val path: ServerPath) {
constructor(path: String) : this(ServerPath(path))
@LightningServerDsl
fun path(string: String) = path.path(string)
@LightningServerDsl
fun get(string: String) = path.get(string)
@LightningServerDsl
fun post(string: String) = path.post(string)
@LightningServerDsl
fun put(string: String) = path.put(string)
@LightningServerDsl
fun patch(string: String) = path.patch(string)
@LightningServerDsl
fun delete(string: String) = path.delete(string)
@LightningServerDsl
fun head(string: String) = path.head(string)
@LightningServerDsl
val get: HttpEndpoint get() = path.get
@LightningServerDsl
val post: HttpEndpoint get() = path.post
@LightningServerDsl
val put: HttpEndpoint get() = path.put
@LightningServerDsl
val patch: HttpEndpoint get() = path.patch
@LightningServerDsl
val delete: HttpEndpoint get() = path.delete
@LightningServerDsl
val head: HttpEndpoint get() = path.head
}