in reply to Dancer2: respond to client while making its own async call

Hi Steve

It's as simple as:

post '/blorgle' => sub { debug('Entering delayed handler'); delayed { my %params = params; flush; content '<html><body>ok</body></html>'; done; debug('Sent response'); # Do your async job here }; };

See Dancer2::Core::Response::Delayed,

Hope this helps!

The way forward always starts with a minimal test.