private def add[RequestType: TypeTag, ResponseType: TypeTag]()

in http-server/src/main/scala/com/twitter/finatra/http/RouteDSL.scala [581:606]


  private def add[RequestType: TypeTag, ResponseType: TypeTag](
    method: Method,
    route: String,
    name: String,
    admin: Boolean,
    index: Option[RouteIndex],
    callback: RequestType => ResponseType
  ) = {
    require(
      route.startsWith("/"),
      s"""Invalid route: "$route." Routes MUST begin with a forward slash (/).""")

    contextWrapper {
      routeBuilders += new RouteBuilder(
        method,
        prefixRoute(route),
        name,
        clazz,
        admin,
        index,
        callback,
        annotations,
        contextVar().copy()
      )
    }
  }