+htp #18837 allow as[Source[Tweet, NotUsed]]
This commit is contained in:
parent
c76ec2ac15
commit
c3308149be
3 changed files with 19 additions and 10 deletions
|
|
@ -111,6 +111,8 @@ class JsonStreamingExamplesSpec extends RoutingSpec {
|
|||
path("metrics") {
|
||||
// [4] extract Source[Measurement, _]
|
||||
entity(asSourceOf[Measurement]) { measurements =>
|
||||
// alternative syntax:
|
||||
// entity(as[Source[Measurement, NotUsed]]) { measurements =>
|
||||
val measurementsSubmitted: Future[Int] =
|
||||
measurements
|
||||
.via(persistMetrics)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue