Hi
I'm confronted to this problem :
I'm using this dependencies:
akka-http-experimental_2.11 V1.0 latest release
My code is pretty simple as exactly like the sample on the documentation
class HttpFlow(implicit system: ActorSystem, actorMaterializer: ActorMaterializer) {
protected implicit val executor: ExecutionContext = system.dispatcher
val poolConfig = ConnectionPoolSettings(system)
val flowConnection = Http().cachedHostConnectionPool[Unit]("rtbe.adsymptotic.com", settings = poolConfig)
def callHTTP(request : HttpRequest) : Future[(Try[HttpResponse], Unit)] = {
Source.single[HttpRequest](request)
.via(flowConnection)
.runWith(Sink.head)
}
}
I got a compilation error:
Error:(27, 12) type mismatch;
found : akka.stream.scaladsl.Flow[(akka.http.scaladsl.model.HttpRequest, Nothing),(scala.util.Try[akka.http.scaladsl.model.HttpResponse], Nothing),akka.http.scaladsl.Http.HostConnectionPool]
required: akka.stream.Graph[akka.stream.FlowShape[akka.http.scaladsl.model.HttpRequest,?],?]
.via(flowConnection)
^
Is another way to use the HTTP client in 1.0 and the documentation is not updated ?
Thanks