如何在akka流中请求https

时间:2016-11-01 17:30:24

标签: scala akka-stream akka-http

这是我的代码

val connectionFlow: Flow[HttpRequest, HttpResponse, Future[Http.OutgoingConnection]] = Http().outgoingConnectionHttps(host = "https://www.google.co.th/?gws_rd=ssl")
 val result = Source.single(HttpRequest(uri = url, method = HttpMethods.GET))
  .via(connectionFlow)
  .runWith(Sink.headOption)

我收到错误

java.lang.NoSuchMethodError: akka.stream.scaladsl.TLS$.apply$default$4()Lakka/stream/TLSClosing

如何修复

0 个答案:

没有答案