Skip to content

Instantly share code, notes, and snippets.

@s1monw1
Created October 7, 2022 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s1monw1/867c0628f05a16b4ce52664e27ea8f68 to your computer and use it in GitHub Desktop.
Save s1monw1/867c0628f05a16b4ce52664e27ea8f68 to your computer and use it in GitHub Desktop.
val req = Request(GET, "/greet/{name}")
val reqWithName = nameLens.inject("kotlin", req)
// alternatively, http4k offers a with function that can apply multiple lenses at once
val reqWithName = Request(GET, "/greet/{name}").with(
nameLens of "simon" //, more lenses
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment