HttpServerContext

data class HttpServerContext(val context: Context<HttpServerCall>, val attributes: Map<*, *> = context.attributes)

Constructors

Link copied to clipboard
fun HttpServerContext(    request: HttpServerRequestPort = HttpServerRequest(),     response: HttpServerResponse = HttpServerResponse(),     predicate: HttpServerPredicate = HttpServerPredicate(),     attributes: Map<*, *> = emptyMap<Any, Any>())
Link copied to clipboard
fun HttpServerContext(context: Context<HttpServerCall>, attributes: Map<*, *> = context.attributes)

Functions

Link copied to clipboard
fun badRequest(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun clientError(    status: ClientErrorStatus,     body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun created(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun forbidden(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun internalServerError(    exception: Exception,     headers: HttpFields<Header> = response.headers,     attributes: Map<*, *> = context.attributes): HttpServerContext
fun internalServerError(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun next(): HttpServerContext
Link copied to clipboard
fun notFound(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun ok(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun redirect(    status: RedirectionStatus,     body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun send(response: HttpServerResponse, attributes: Map<*, *> = emptyMap<Any, Any>()): HttpServerContext
fun send(    status: HttpStatus = response.status,     body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun serverError(    status: ServerErrorStatus,     exception: Exception,     headers: HttpFields<Header> = response.headers,     attributes: Map<*, *> = context.attributes): HttpServerContext
fun serverError(    status: ServerErrorStatus,     body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun sse(body: SubmissionPublisher<HttpServerEvent>): HttpServerContext
Link copied to clipboard
fun success(    status: SuccessStatus,     body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext
Link copied to clipboard
fun unauthorized(    body: Any = response.body,     headers: HttpFields<Header> = response.headers,     contentType: ContentType? = response.contentType,     cookies: List<HttpCookie> = response.cookies,     attributes: Map<*, *> = context.attributes): HttpServerContext

Properties

Link copied to clipboard
val accept: List<ContentType>
Link copied to clipboard
val allParameters: MultiMap<String, *>
Link copied to clipboard
val attributes: Map<*, *>
Link copied to clipboard
val certificate: X509Certificate?
Link copied to clipboard
val certificateChain: List<X509Certificate>
Link copied to clipboard
val context: Context<HttpServerCall>
Link copied to clipboard
val exception: Exception?
Link copied to clipboard
val formParameters: HttpFields<FormParameter>
Link copied to clipboard
val host: String
Link copied to clipboard
val method: HttpMethod
Link copied to clipboard
val origin: String?
Link copied to clipboard
val parts: List<HttpPartPort>
Link copied to clipboard
val partsMap: Map<String, HttpPartPort>
Link copied to clipboard
val path: String
Link copied to clipboard
val pathParameters: Map<String, String>
Link copied to clipboard
val port: Int
Link copied to clipboard
val protocol: HttpProtocol
Link copied to clipboard
val queryParameters: HttpFields<QueryParameter>
Link copied to clipboard
val referer: String?
Link copied to clipboard
val request: HttpServerRequestPort
Link copied to clipboard
val response: HttpServerResponse
Link copied to clipboard
val status: HttpStatus
Link copied to clipboard
val url: URL
Link copied to clipboard
val userAgent: String?