<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi again,<br>
Does anybody know if and how it is possible<br>
to render a template for the user and <br>
then forward to a new route,<br>
<br>
Something like <br>
<br>
<pre><code>get '/routeA/:*?' => sub {
my $id = params->{'id'};
my $blub = params->{'blub'};
delayed {
my $tt = Template->new(
{INCLUDE_PATH => "$path",
WRAPPER => 'layout.tt',
RELATIVE => 1,
}) || die "Template error: $Template::ERROR\n";
$tt->process('view.tt', {
'id' => $id,
'bla' => $blub
};
flush;
content $tt;
done;
};
forward '/routeB/',{ </code>
<code><code> 'id' => $id,
'bla' => $blub</code>
};
};
</code><code>get '/routeB/:*?' => sub {
my $id = params->{'id'};
my $blub = params->{'bla'};
# Do something from here on
}; </code>
</pre>
That would solve the async response troubles for me I guess.<br>
<br>
@John, I'd rather try to do as much as possible without having to
handle JSON additionally,<br>
if async streaming is possible the way I like to use it, I will have
no other choice anyway I guess.<br>
<br>
--joerg<br>
<br>
<br>
</body>
</html>