Package com.hexagonkt.http.model

TODO

Types

Link copied to clipboard
enum ClientErrorStatus : Enum<ClientErrorStatus> , HttpStatus

Supported HTTP responses status.

Link copied to clipboard
data class ContentType(    val mediaType: MediaType,     val boundary: String? = null,     val charset: Charset? = null,     val q: Double? = null)
Link copied to clipboard
data class CustomStatus(val code: Int, val type: HttpStatusType = when (code) { in 100..199 -> INFORMATION in 200..299 -> SUCCESS in 300..399 -> REDIRECTION in 400..499 -> CLIENT_ERROR in 500..599 -> SERVER_ERROR else -> throw IllegalArgumentException(INVALID_CODE_ERROR_MESSAGE + code) }) : HttpStatus
Link copied to clipboard
data class FormParameter(val name: String, val values: List<String>) : HttpField
Link copied to clipboard
data class Header(val name: String, val values: List<String>) : HttpField
Link copied to clipboard
interface HttpBase
Link copied to clipboard
interface HttpCall<I : HttpRequest, O : HttpResponse>
Link copied to clipboard
data class HttpCookie(    val name: String,     val value: String,     val maxAge: Long = -1,     val secure: Boolean = false,     val path: String = "/",     val httpOnly: Boolean = true,     val domain: String = "",     val sameSite: Boolean = true,     val expires: Instant? = null)
Link copied to clipboard
interface HttpField

TODO Used in headers, query parameters and form parameters

Link copied to clipboard
data class HttpFields<T : HttpField>(val httpFields: Map<String, T>)
Link copied to clipboard
interface HttpMessage : HttpBase
Link copied to clipboard
enum HttpMethod : Enum<HttpMethod>

Supported HTTP methods.

Link copied to clipboard
data class HttpPart(    val name: String,     val body: Any,     val headers: HttpFields<Header> = HttpFields(),     val contentType: ContentType? = null,     val size: Long = -1L,     val submittedFileName: String? = null) : HttpPartPort
Link copied to clipboard
interface HttpPartPort : HttpBase
Link copied to clipboard
enum HttpProtocol : Enum<HttpProtocol>

Supported HTTP protocols.

Link copied to clipboard
interface HttpRequest : HttpMessage
Link copied to clipboard
interface HttpResponse : HttpMessage
Link copied to clipboard
data class HttpServerEvent(    val event: String? = null,     val data: String? = null,     val id: String? = null,     val retry: Long? = null)
Link copied to clipboard
interface HttpStatus

Supported HTTP responses status.

Link copied to clipboard
enum HttpStatusType : Enum<HttpStatusType>
Link copied to clipboard
enum InformationStatus : Enum<InformationStatus> , HttpStatus

Supported HTTP responses status.

Link copied to clipboard
data class QueryParameter(val name: String, val values: List<String>) : HttpField
Link copied to clipboard
enum RedirectionStatus : Enum<RedirectionStatus> , HttpStatus

Supported HTTP responses status.

Link copied to clipboard
enum ServerErrorStatus : Enum<ServerErrorStatus> , HttpStatus

Supported HTTP responses status.

Link copied to clipboard
enum SuccessStatus : Enum<SuccessStatus> , HttpStatus

Supported HTTP responses status.