Package-level declarations

Utility callbacks that can be used on handlers. Reuse a callback in different handlers (after, filter, etc.).

Types

Link copied to clipboard
class CorsCallback(allowedOrigin: Regex, allowedMethods: Set<HttpMethod> = ALL, allowedHeaders: Set<String> = emptySet(), exposedHeaders: Set<String> = emptySet(), supportCredentials: Boolean = true, preFlightStatus: HttpStatus = NO_CONTENT_204, preFlightMaxAge: Long = 0) : Function1<HttpContext, HttpContext>

HTTP CORS callback. It holds info for CORS.

Link copied to clipboard
class DateCallback(name: String = "date") : Function1<HttpContext, HttpContext>

Callback that adds the date header to the response (caching its value).

Link copied to clipboard
class FileCallback(file: File) : Function1<HttpContext, HttpContext>

Callback that resolves requests' path parameters to files based on a base file. Requests path parameters are not allowed to contain .. (references to file parent directories are not permitted).

Link copied to clipboard
class LoggingCallback(level: System.Logger.Level = Level.INFO, logger: Logger = Logger(LoggingCallback::class), includeHeaders: Boolean = false, includeBody: Boolean = true) : Function1<HttpContext, HttpContext>

Callback that logs server requests and responses.

Link copied to clipboard
class UrlCallback(url: URL) : Function1<HttpContext, HttpContext>