[99s-extend] Big body via REST

Sergey Yelin elinsn at gmail.com
Thu Feb 7 15:46:31 CET 2013


Ok, thanks.

On Feb 7, 2013, at 6:41 PM, Loïc Hoguin <essen at ninenines.eu> wrote:

> On 02/07/2013 11:04 AM, Sergey Yelin wrote:
>> Hi list,
>> 
>> how properly send big response (hundreds of megabytes) via REST callback? As far as I can see REST handler in cowboy handles special case for callback functions (cowboy_rest.erl, line 844): {stream, StreamFun} - is it right place for stream big response from SQL database?
> 
> Hey,
> 
> If you know the size, reply with {stream, Size, StreamFun}, otherwise {stream, StreamFun}, with StreamFun the function that will send all the data to the socket.
> 
> -- 
> Loïc Hoguin
> Erlang Cowboy
> Nine Nines
> http://ninenines.eu

---
Best regards,
Sergey Yelin.






More information about the Extend mailing list