api

http4k / org.http4k.lens / ContentNegotiation

ContentNegotiation

interface ContentNegotiation (source)

Modes for determining if a passed content type is acceptable.

Functions

Name Summary
invoke abstract operator fun invoke(expected: ContentType, actual: ContentType?): Unit

Companion Object Properties

Name Summary
None val None: ContentNegotiation
No validation is done on the received content type at all
NonStrict val NonStrict: ContentNegotiation
If present, the received Content-type header passed back MUST equal the expected Content-type, including directive
Strict val Strict: ContentNegotiation
The received Content-type header passed back MUST equal the expected Content-type, including directive
StrictNoDirective val StrictNoDirective: ContentNegotiation
The received Content-type header passed back MUST equal the expected Content-type, not including the directive

Extension Functions

Name Summary
with fun <T> T.with(vararg modifiers: (T) -> T): T