How does one log Akka HTTP client requests

One of the solution I’ve found is to use a: import akka.http.scaladsl.server.directives.DebuggingDirectives val clientRouteLogged = DebuggingDirectives.logRequestResult(“Client ReST”, Logging.InfoLevel)(clientRoute) Http().bindAndHandle(clientRouteLogged, interface, port) Which can easily log the request and result in raw(bytes) format. The problem is that those logs are completely unreadable. And here is place where it became complicated. Here is my example that encode … Read more

Spray, Akka-http and Play, Which is the best bet for a new HTTP/REST project

Spray is production ready, but the development team (Mathias Doenitz) works for Typesafe on Akka-http now. The status of Akka-http is “development preview”. There are vague promises of a full release “within a few months”, but nothing you can take to the bank. Edited 29-July-2015: The status of Akka-HTTP is now “release candidate” with version … Read more

How to create a Source that can receive elements later via a method call?

There are three ways this can be achieved: 1. Post Materialization with SourceQueue You can use Source.queue that materializes the Flow into a SourceQueue: case class Weather(zipCode : String, temperature : Double, raining : Boolean) val bufferSize = 100 //if the buffer fills up then this strategy drops the oldest elements //upon the arrival of … Read more