[akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-07 Thread Allan Brighton
Hi, I know how to do this now using the new akka-http core API, but how would it work using the spray-like DSL? How can I complete an http get using a Future[Source[ByteString]]? import akka.http.model._ import akka.http.server._ ... def route: Route = path("get") { get { par

Re: [akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-20 Thread Roland Kuhn
Hi Allan, there should in principle be a marshaller that wraps your Source into an Entity, what is the exact error you are seeing? Regards, Roland > 7 jan 2015 kl. 14:00 skrev Allan Brighton : > > Hi, > > I know how to do this now using the new akka-http core API, but how would it > work us

Re: [akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-20 Thread Allan Brighton
Hi Roland, I wasn't sure how to use the new streaming APIs from the spray DSL, so I used the akka-http core API instead: implicit val materializer = FlowMaterializer() val binding = Http().bind(interface = settings.interface, port = settings. port) binding.connections.foreach { c ⇒ lo

Re: [akka-user] akka-http-experimental: Using the spray DSL: how to complete a route with a Source[ByteString]?

2015-01-20 Thread André
Hi Allan, have you tried the completeWith directive? Look here