how to return a big dynamic content?

52 views
Skip to first unread message

serg

unread,
Jun 1, 2015, 4:28:06 AM6/1/15
to mojol...@googlegroups.com
im tryng to use mojo::server::prefork as a http-server

I would like to calculate a part of content and send it to client,
then next part, then next part...
It is easy to do in apache+mod_perl, but I cant understand how to do it in mojo...

ps: sorry for my english )

Alex Efros

unread,
Jun 1, 2015, 4:32:54 AM6/1/15
to mojol...@googlegroups.com
Hi!

On Mon, Jun 01, 2015 at 01:28:06AM -0700, serg wrote:
> I would like to calculate a part of content and send it to client,
> then next part, then next part...
> It is easy to do in apache+mod_perl, but I cant understand how to do it in
> mojo...

EventSource works in similar way, check this example:
https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Cookbook.pod#EventSource-web-service

--
WBR, Alex.

serg

unread,
Jun 1, 2015, 11:01:10 AM6/1/15
to mojol...@googlegroups.com
EventSource works in similar way, check this example:
https://metacpan.org/pod/distribution/Mojolicious/lib/Mojolicious/Guides/Cookbook.pod#EventSource-web-service

--
                        WBR, Alex.

megathanks for help!
i just looked into Mojolicious::Controller to investigate how it uses 'write' method

Reply all
Reply to author
Forward
0 new messages