Andrew O'Hara
08/05/2022, 1:03 PMval jsonBodyLens = ...
val xmlBodyLens = ...
val contentNegotiated = ContentNegotiated.lens(jsonBodyLens, xmlBodyLens)
fun handler(request: Request): Response {
val accept = Header.ACCEPT(request)
val effectiveLens = contentNegotiated(accept)
val content = MyDto(1, "stuff")
return Response(Status.OK).with(effectiveLens of content)
}
If not, want one?