HttpPredicate

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

Constructors

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

Properties

Link copied to clipboard
val exception: KClass<out Exception>? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val predicate: (Context<HttpCall>) -> Boolean
Link copied to clipboard
val status: HttpStatus? = null

Functions

Link copied to clipboard
fun addPrefix(prefix: String): HttpPredicate
Link copied to clipboard
Link copied to clipboard
fun describe(): String
Link copied to clipboard
open operator override fun invoke(context: Context<HttpCall>): Boolean
Link copied to clipboard
fun HttpCallbackType.process(request: HttpRequest, attributes: Map<*, *> = emptyMap<Any, Any>()): HttpContext
fun HttpCallbackType.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>()): HttpContext