HttpServerPredicate

data class HttpServerPredicate(val methods: Set<HttpMethod> = emptySet(), val pathPattern: PathPattern = LiteralPathPattern(), val exception: KClass<out Exception>? = null, val status: HttpStatus? = null) : Function1<Context<HttpServerCall>, Boolean>

Constructors

Link copied to clipboard
fun HttpServerPredicate(methods: Set<HttpMethod> = emptySet(), pattern: String = "", exception: KClass<out Exception>? = null, status: HttpStatus? = null, prefix: Boolean = false)
Link copied to clipboard
fun HttpServerPredicate(methods: Set<HttpMethod> = emptySet(), pathPattern: PathPattern = LiteralPathPattern(), exception: KClass<out Exception>? = null, status: HttpStatus? = null)

Functions

Link copied to clipboard
fun addPrefix(prefix: String): HttpServerPredicate
Link copied to clipboard
Link copied to clipboard
fun describe(): String
Link copied to clipboard
open operator override fun invoke(context: Context<HttpServerCall>): Boolean

Properties

Link copied to clipboard
val exception: KClass<out Exception>? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: HttpStatus? = null

Extensions

Link copied to clipboard
fun HttpCallback.process(request: HttpServerRequest, attributes: Map<*, *> = emptyMap<Any, Any>()): HttpServerContext
fun HttpCallback.process(method: HttpMethod = GET, protocol: HttpProtocol = HTTP, host: String = "localhost", port: Int = 80, path: String = "", queryParameters: QueryParameters = QueryParameters(), headers: Headers = Headers(), body: Any = "", parts: List<HttpPart> = emptyList(), formParameters: FormParameters = FormParameters(), cookies: List<Cookie> = emptyList(), contentType: ContentType? = null, certificateChain: List<X509Certificate> = emptyList(), accept: List<ContentType> = emptyList(), contentLength: Long = -1L, attributes: Map<*, *> = emptyMap<Any, Any>()): HttpServerContext