api

http4k / org.http4k.lens / BiDiBodyLens

BiDiBodyLens

class BiDiBodyLens<FINAL> : LensInjector<FINAL, HttpMessage>, BodyLens<FINAL>

A BiDiBodyLens provides the bi-directional extraction of an entity from a target body, or the insertion of an entity into a target body.

Constructors

Name Summary
<init> A BiDiBodyLens provides the bi-directional extraction of an entity from a target body, or the insertion of an entity into a target body.BiDiBodyLens(metas: List<Meta>, contentType: ContentType, get: (HttpMessage) -> FINAL, setLens: (FINAL, HttpMessage) -> HttpMessage)

Functions

Name Summary
invoke Lens operation to set the value into the targetoperator fun <R : HttpMessage> invoke(value: FINAL, target: R): R