api

http4k / org.http4k.lens / ContentNegotiation

ContentNegotiation

interface ContentNegotiation

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 No validation is done on the received content type at allval None: ContentNegotiation
NonStrict If present, the received Content-type header passed back MUST equal the expected Content-type, including directiveval NonStrict: ContentNegotiation
Strict The received Content-type header passed back MUST equal the expected Content-type, including directiveval Strict: ContentNegotiation
StrictNoDirective The received Content-type header passed back MUST equal the expected Content-type, not including the directiveval StrictNoDirective: ContentNegotiation