[akka-user] Re: Chunked response with akka-http 10.x

2017-04-20 Thread Thibault Meyer
Thanks for your responses. It working very well !

Le jeudi 20 avril 2017 12:02:53 UTC+2, Johannes Rudolph a écrit :
>
> Hi Thibault,
>
> if you have the body of the response already as a Source, 
> you can create a response with a chunked entity from it like this:
>
> HttpResponse.create()
>   .withEntity(HttpEntities.create(contentType, source))
>
> Johannes
>
> On Thursday, April 20, 2017 at 9:56:47 AM UTC+2, Thibault Meyer wrote:
>>
>> Hi,
>>
>> I trying akka-http (version 10.x) by creating a small API who generate 
>> UUID on demand. For a bulk UUID creation (ex: */uuid1/5000* to get 5000 
>> UUID v1), I would like to return a chunked response to avoir building a 
>> list of  item on memory.
>>
>> From Play 2.5 I usually using final Source source = 
>> Source.fromGraph(...) but I don't find how to do this with akka-http and 
>> akka-stream.
>>
>> Do you have any idea how to do this ?
>>
>

-- 
>>  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.


[akka-user] Re: Chunked response with akka-http 10.x

2017-04-20 Thread Thibault Meyer
Hi,


thanks for your response. It working very well !



Le jeudi 20 avril 2017 12:02:53 UTC+2, Johannes Rudolph a écrit :
>
> Hi Thibault,
>
> if you have the body of the response already as a Source, 
> you can create a response with a chunked entity from it like this:
>
> HttpResponse.create()
>   .withEntity(HttpEntities.create(contentType, source))
>
> Johannes
>
> On Thursday, April 20, 2017 at 9:56:47 AM UTC+2, Thibault Meyer wrote:
>>
>> Hi,
>>
>> I trying akka-http (version 10.x) by creating a small API who generate 
>> UUID on demand. For a bulk UUID creation (ex: */uuid1/5000* to get 5000 
>> UUID v1), I would like to return a chunked response to avoir building a 
>> list of  item on memory.
>>
>> From Play 2.5 I usually using final Source source = 
>> Source.fromGraph(...) but I don't find how to do this with akka-http and 
>> akka-stream.
>>
>> Do you have any idea how to do this ?
>>
>

-- 
>>  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.


[akka-user] Re: Chunked response with akka-http 10.x

2017-04-20 Thread 'Johannes Rudolph' via Akka User List
Hi Thibault,

if you have the body of the response already as a Source, 
you can create a response with a chunked entity from it like this:

HttpResponse.create()
  .withEntity(HttpEntities.create(contentType, source))

Johannes

On Thursday, April 20, 2017 at 9:56:47 AM UTC+2, Thibault Meyer wrote:
>
> Hi,
>
> I trying akka-http (version 10.x) by creating a small API who generate 
> UUID on demand. For a bulk UUID creation (ex: */uuid1/5000* to get 5000 
> UUID v1), I would like to return a chunked response to avoir building a 
> list of  item on memory.
>
> From Play 2.5 I usually using final Source source = 
> Source.fromGraph(...) but I don't find how to do this with akka-http and 
> akka-stream.
>
> Do you have any idea how to do this ?
>

-- 
>>  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.