HttpServerContext
data class HttpServerContext(val context: Context<HttpServerCall>, val attributes: Map<*, *> = context.attributes)
Content copied to clipboard
Constructors
Link copied to clipboard
fun HttpServerContext( request: HttpServerRequestPort = HttpServerRequest(), response: HttpServerResponse = HttpServerResponse(), predicate: HttpServerPredicate = HttpServerPredicate(), attributes: Map<*, *> = emptyMap<Any, Any>())
Content copied to clipboard
Link copied to clipboard
fun HttpServerContext(context: Context<HttpServerCall>, attributes: Map<*, *> = context.attributes)
Content copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
fun internalServerError( exception: Exception, headers: HttpFields<Header> = response.headers, attributes: Map<*, *> = context.attributes): HttpServerContext
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
fun send(response: HttpServerResponse, attributes: Map<*, *> = emptyMap<Any, Any>()): HttpServerContext
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
fun serverError( status: ServerErrorStatus, exception: Exception, headers: HttpFields<Header> = response.headers, attributes: Map<*, *> = context.attributes): HttpServerContext
Content copied to clipboard
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
Content copied to clipboard
Link copied to clipboard
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
Content copied to clipboard
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
Content copied to clipboard