function getRequestMethod(req) {
  // Pseudo API
  if (typeof req.getMethod === "function") {
    return req.getMethod();
  }

  return req.method;
}
@template {IncomingMessage & ExpectedIncomingMessage} Request
@param {Request} req req
@returns {string | undefined} request method