Hi all, 

I am trying to consume a Json based API using the Http client system.

My code is the following :

```scala
  implicit val system = ActorSystem("client-system")
  implicit val materializer = ActorFlowMaterializer()
  val host = "127.0.0.1"
  val httpClient = Http(system).outgoingConnection(host, 80)
  def get(url: String): Future[HttpResponse] = 
Source.single(HttpRequest(uri = 
Uri("/"))).via(httpClient).runWith(Sink.head)
```

The server send a simple valid Json. I try to figure out how to parse the 
HttpResponse.entity using a SprayJson protocol. I would like to 
get a Future[String].

Is there a simple way to map the flow from the httpClient to extract a 
String ?

Cheers,

Guillaume

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to