Skip to content

Instantly share code, notes, and snippets.

@adamw
Created February 15, 2018 15:43
Show Gist options
  • Save adamw/46af5b80b1f0d38a70515a31d5fda688 to your computer and use it in GitHub Desktop.
Save adamw/46af5b80b1f0d38a70515a31d5fda688 to your computer and use it in GitHub Desktop.
val routes: Route =
logDuration {
get {
path("test") {
val s = Source.tick(0.seconds, 1.second, "x").take(5).map(ByteString(_))
complete(HttpEntity(ContentTypes.`text/plain(UTF-8)`, s))
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment