Hi folks,

I'm stuck with an HttpRequest query processing. I try to return a stream 
who contains a subpart of a a REST stream response.  eg:

GET /foo
=>
{
 bar: {},
 ....
 results: [
  {foo: 1},
  {foo: 2},
  {foo: 3},
  {foo: 4},
  {foo: 5},
   ....
  {foo: 1000000}
 ]
}

What I want to stream :
[
  {foo: 1},
  {foo: 2},
  {foo: 3},
  {foo: 4},
  {foo: 5},
   ....
  {foo: 1000000}
 ]

My current code use akka-stream-circe and akka-http-circe and looks like :

val request = HttpRequest(uri =
  Uri(cfg.get[String]("my.endpoint"))
    .withPath(Path("/foo"))
    .withQuery(Query("search" -> "foo"))
)

Http()
  .singleRequest(request)
  .map(response => response.entity.dataBytes.via( 
CirceStreamSupport.decode[???????????????????????] )) pipeTo sender


Unfortunately, I don't understand  how to configure Jawn with Circe to 
"ignore" all json content except this array... Maybe Akka HTTP module allow 
me to do that out of the box ?

Regards,

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to