ktor-server-core / io.ktor.routing / HttpAcceptRouteSelector

HttpAcceptRouteSelector

data class HttpAcceptRouteSelector : RouteSelector

Evaluates a route against a content-type in the HttpHeaders.Accept header in the request

Parameters

contentType - is an instance of ContentType

Constructors

<init>

HttpAcceptRouteSelector(contentType: ContentType)

Evaluates a route against a content-type in the HttpHeaders.Accept header in the request

Properties

contentType

val contentType: ContentType

is an instance of ContentType

Inherited Properties

quality

val quality: Double

indicates how good this selector is compared to siblings

Functions

evaluate

fun evaluate(context: RoutingResolveContext, segmentIndex: Int): RouteSelectorEvaluation

Evaluates this selector against context and a path segment at segmentIndex

toString

fun toString(): String