api

http4k / org.http4k.lens / BodyLens

BodyLens

open class BodyLens<out FINAL> : LensExtractor<HttpMessage, FINAL>

A BodyLens provides the uni-directional extraction of an entity from a target body.

Constructors

Name Summary
<init> A BodyLens provides the uni-directional extraction of an entity from a target body.BodyLens(metas: List<Meta>, contentType: ContentType, getLens: (HttpMessage) -> FINAL)

Properties

Name Summary
contentType val contentType: ContentType
metas val metas: List<Meta>

Functions

Name Summary
invoke Lens operation to get the value from the targetopen operator fun invoke(target: HttpMessage): FINAL

Inheritors

Name Summary
BiDiBodyLens A BiDiBodyLens provides the bi-directional extraction of an entity from a target body, or the insertion of an entity into a target body.class BiDiBodyLens<FINAL> : LensInjector<FINAL, HttpMessage>, BodyLens<FINAL>