I want to deconstruct the HttpResponse
that I get from Server
Success(HttpResponse(200 OK,List(Server: akka-http/2.3.12, Date: Tue, 04 Aug 2015 22:20:21 GMT),HttpEntity.Default(application/json,69,akka.stream.scaladsl.Source@52ffaba9),HttpProtocol(HTTP/1.1)))
I looked at documentation, but I am not sure how do I deconstruct it
The way I am trying it is
val responseFuture: Future[HttpResponse] =
Http().singleRequest(HttpRequest(uri = "http://localhost:8080"))
responseFuture onComplete {
case Success(_) =>
log.info("response received {}", response)
log.info("notified about EC Failure")
}
But I am not sure what is the effective way to pattern match on it