edit

Typesafe HTTP requests with lenses

Example showing how to create and apply lenses to requests and responses to both extract and inject typesafe values out of and into HTTP messages. Note that since the http4k Request/Response objects are immutable, all injection occurs via copy.

Gradle setup

    compile group: "org.http4k", name: "http4k-core", version: "2.21.2"

Code