Skip to content

Instantly share code, notes, and snippets.

@adamw
Created February 18, 2019 12:48
Show Gist options
  • Save adamw/40462e8a4dbc7b859a40d8550ee2f28e to your computer and use it in GitHub Desktop.
Save adamw/40462e8a4dbc7b859a40d8550ee2f28e to your computer and use it in GitHub Desktop.
val addBook: Endpoint[(Book, String), Unit, Boolean, Nothing] =
endpoint
.post
.in("book" / "add")
.in(jsonBody[Book])
.in(header[String]("X-Auth-Token"))
.out(plainBody[Boolean])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment