api

http4k / org.http4k.lens / BiDiBodyLensSpec

BiDiBodyLensSpec

open class BiDiBodyLensSpec<OUT> : BodyLensSpec<OUT> (source)

Represents a bi-directional extraction of an entity from a target Body, or an insertion into a target Body.

Constructors

Name Summary
<init> BiDiBodyLensSpec(metas: List<Meta>, contentType: ContentType, get: LensGet<HttpMessage, OUT>, set: LensSet<HttpMessage, OUT>)
Represents a bi-directional extraction of an entity from a target Body, or an insertion into a target Body.

Functions

Name Summary
map fun <NEXT> map(nextIn: (OUT) -> NEXT, nextOut: (NEXT) -> OUT): BiDiBodyLensSpec<NEXT>
Create another BiDiBodyLensSpec which applies the bi-directional transformations to the result. Any resultant Lens can be used to extract or insert the final type from/into a Body.
toLens open fun toLens(): BiDiBodyLens<OUT>
Create a lens for this Spec

Inherited Functions

Name Summary
map fun <NEXT> map(nextIn: (OUT) -> NEXT): BodyLensSpec<NEXT>
Create another BodyLensSpec which applies the uni-directional transformation to the result. Any resultant Lens can only be used to extract the final type from a Body.

Extension Functions

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