function getHeadersSent(res) {
  // Pseudo API
  if (typeof res.getHeadersSent === "function") {
    return res.getHeadersSent();
  }

  return res.headersSent;
}
@template {ServerResponse & ExpectedServerResponse} Response
@param {Response} res res
@returns {boolean} true when headers were sent, otherwise false