Package io.ktor.locations
Types
class LocationAttributeRouteService : LocationRouteService Implements LocationRouteService by extracting routing information from a Location annotation. |
|
data class LocationInfo A location class/object registration info. |
|
abstract class LocationPropertyInfo Represents a location’s property |
|
interface LocationRouteService Provides services for extracting routing information from a location class. |
|
open class Locations Ktor feature that allows to handle and construct routes in a typed way. |
Annotations
annotation class KtorExperimentalLocationsAPI API marked with this annotation is experimental and is not guaranteed to be stable. |
|
annotation class Location Annotation for classes that will act as typed routes. |
Exceptions
class LocationRoutingException : Exception Exception indicating that route parameters in curly brackets do not match class properties. |
Properties
val PipelineContext<Unit, ApplicationCall>.locations: Locations val ApplicationCall.locations: Locations val Application.locations: Locations Gets the Application.locations feature |
Functions
fun <T : Any> Route.delete( Registers a typed handler body for a |
|
fun <T : Any> Route.get( Registers a typed handler body for a |
|
fun <T : Any> Route.handle( Registers a handler body for a location defined by class T. fun <T : Any> Route.handle( Registers a handler body for a location defined by class dataClass. |
|
fun <T : Any> Route.head( Registers a typed handler body for a |
|
fun PipelineContext<Unit, ApplicationCall>.href( Renders link to a location using current installed locations service |
|
Registers a route body for a location defined by class T. Registers a route body for a location defined by class data. |
|
fun <T : Any> ApplicationCall.locationOrNull(): T Retrieves the current call’s location or |
|
fun <T : Any> Route.options( Registers a typed handler body for a |
|
fun <T : Any> Route.patch( Registers a typed handler body for a |
|
fun <T : Any> Route.post( Registers a typed handler body for a |
|
fun <T : Any> Route.put( Registers a typed handler body for a |
|
fun ApplicationCall.url( Constructs a String with the url of a instance location whose class must be annotated with Location. |