private ResponseEntity<CasEvent> importSingleEvent(final HttpServletRequest request) throws Throwable {
        try (val in = request.getInputStream()) {
            val requestBody = IOUtils.toString(in, StandardCharsets.UTF_8);
            val casEvent = MAPPER.readValue(requestBody, CasEvent.class);
            eventRepository.getObject().save(casEvent);
            return ResponseEntity.ok().build();
        }
    }
Upload events.

@param request the request
@return the response entity
@throws Exception the exception
core/cas-server-core-events-api/src/main/java/org/apereo/cas/support/events/web/CasEventsReportEndpoint.java