hexagon_http / com.hexagonkt.http

Package com.hexagonkt.http

HTTP code shared between clients and servers.

Types

HttpTest

class HttpTest

Method

Enum for the supported HTTP methods.

enum class Method

Part

data class Part

PartTest

class PartTest

Path

A path definition. It parses path patterns and extract values for parameters.

data class Path

PathTest

TODO Check that URLs with blank parameters are not matched. Ie: /alpha/{param}/bravo is not matched by /alpha//bravo

class PathTest

Protocol

Enum for the supported HTTP methods.

enum class Protocol

Route

data class Route

RouteTest

class RouteTest

SslSettings

data class SslSettings

Extensions for External Classes

kotlin.String

Properties

ALL

Set containing all HTTP methods.

val ALL: LinkedHashSet<Method>

Functions

any

Shortcut to create a route for a filter (with all methods).

fun any(path: String = "/"): Route

delete

Shortcut to create a DELETE route.

fun delete(path: String = "/"): Route

get

Shortcut to create a GET route.

fun get(path: String = "/"): Route

head

Shortcut to create a HEAD route.

fun head(path: String = "/"): Route

httpDate

fun httpDate(date: LocalDateTime = LocalDateTime.now()): String

options

Shortcut to create a OPTIONS route.

fun options(path: String = "/"): Route

parseQueryParameters

fun parseQueryParameters(query: String): Map<String, List<String>>

patch

Shortcut to create a PATCH route.

fun patch(path: String = "/"): Route

post

Shortcut to create a POST route.

fun post(path: String = "/"): Route

put

Shortcut to create a PUT route.

fun put(path: String = "/"): Route

trace

Shortcut to create a TRACE route.

fun trace(path: String = "/"): Route