Hi all,
I am trying to consume a chunked http stream from the client side. The code
is basically identical to the gist
https://gist.github.com/rklaehn/3f26c3f80e5870831f52#file-client-example
```scala
val printChunksConsumer = Sink.foreach[HttpResponse] { res =>
if(res.status == StatusCodes.OK) {
println("Got 200!")
if(res.entity.isChunked)
println("Chunky!")
res.entity.dataBytes.map { chunk =>
System.out.write(chunk.toArray)
System.out.flush()
}.to(Sink.ignore).run()
} else
println(res.status)
}
```
However, it seems that this still does not work. When I do a request that
produces a very long chunked response, the map never gets executed. I tried
various ways of accessing the chunks: matching on the entity and mapping
the chunks, dataBytes, getDataBytes. Nothing seems to make a difference.
The server side is definitely working. At least it works like a charm when
using curl.
This is using akka-http 1.0-M5.
Any ideas?
Rüdiger
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.