api

http4k / org.http4k.core / ContentType

ContentType

data class ContentType

Constructors

Name Summary
<init> ContentType(value: String, directives: Parameters = emptyList())

Properties

Name Summary
directives val directives: Parameters
value val value: String

Functions

Name Summary
equalsIgnoringDirectives fun equalsIgnoringDirectives(that: ContentType): Boolean
toHeaderValue fun toHeaderValue(): String
withNoDirectives fun withNoDirectives(): ContentType

Companion Object Properties

Name Summary
APPLICATION_FORM_URLENCODED val APPLICATION_FORM_URLENCODED: ContentType
APPLICATION_JSON val APPLICATION_JSON: ContentType
APPLICATION_PDF val APPLICATION_PDF: ContentType
APPLICATION_XML val APPLICATION_XML: ContentType
MULTIPART_FORM_DATA val MULTIPART_FORM_DATA: ContentType
OCTET_STREAM val OCTET_STREAM: ContentType
TEXT_HTML val TEXT_HTML: ContentType
TEXT_PLAIN val TEXT_PLAIN: ContentType
TEXT_XML val TEXT_XML: ContentType
TEXT_YAML val TEXT_YAML: ContentType

Companion Object Functions

Name Summary
MultipartFormWithBoundary fun MultipartFormWithBoundary(boundary: String): ContentType
MultipartMixedWithBoundary fun MultipartMixedWithBoundary(boundary: String): ContentType
Text fun Text(value: String, charset: Charset? = Charsets.UTF_8): ContentType