Re: [akka-user] how to extract the (json) string out of a (Akka-http) RequestEntity

2015-01-16 Thread Robin Bakkerus
Txs Ian, your solution works but now I am running into another problem. In the result string all quotes are lost! In my earlier post, I only included a very small porting of the cmd-line. In practice this cmd line looks more like this: curl -i -H "Accept: application/json" -H "Content-Type:appli

Re: [akka-user] how to extract the (json) string out of a (Akka-http) RequestEntity

2015-01-16 Thread Ian Holsman
I'm not saying this is the best way.. val postDataF: Future[ByteString] = entity.dataBytes.fold(ByteString("")) { (z, i) => z.concat(i)} val postData: String = Await.result(postDataF, 50.millis).decodeString("UTF-8") On Sat, Jan 17, 2015 at 12:26 AM, Robin Bakkerus wrote: > Can some one help m

[akka-user] how to extract the (json) string out of a (Akka-http) RequestEntity

2015-01-16 Thread Robin Bakkerus
Can some one help me with (I think) a very simply question, but one I could not figure out myself yet. It is about how extract the (json) string out of the RequestEntity, inside a HttpRequest >From the command line I give a command like this: curl -i -H "Accept: application/json" -H "Content-Ty