answerStarted function

bool answerStarted(
  1. HttpResponse res
)

true when the answer of req is already started or ended by its handler: the head is sent or the response is closed

Implementation

bool answerStarted(HttpResponse res) {
  return res is! NativeResponse || res.headSent || res.isClosed;
}