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 allane...@gmail.com: Hi, I know how to do this now using the new akka-http core API, but how

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 https://github.com/akka/akka/blob/release-2.3-dev/akka-http/src/main/scala/akka/http/server/directives/MarshallingDirectives.scala#L39-L49 directive? Look here

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 ⇒

[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 {