Hello,
I have the following problem. I have a service which gets call, it must answer with 200, close the connection and post to another web service. If I do it in a non-blocking way premature closing occurs.
E.g. :
sub res1{
my $c=shift;
$c->render(status=>200,data=>'');
my $ua = Mojo::UserAgent->new;
my $tx = $ua->build_tx(POST => 'http//
www.example.com');
$ua->start($tx=> sub{
my ($uax, $txx) = @_;
$c->app->log->debug(Dumper($txx));
});
}
Is there a way to make a post after rendering without blocking ?
Thanks,
IA